Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/vivizzz007/vivi-music/llms.txt

Use this file to discover all available pages before exploring further.

The Spotify integration lets you carry your existing Spotify library into VIVI Music without having to rebuild it from scratch. VIVI reads your Spotify playlists and liked songs, then matches each track to a YouTube Music stream so you can listen immediately — no Spotify subscription required during playback. The imported playlists live in your local VIVI library just like any playlist you create by hand.
Playback always uses YouTube Music streams. A Spotify Premium subscription is not required to use imported playlists in VIVI Music. Spotify credentials are only needed for the one-time import step.

Connecting your Spotify account

1

Open Spotify settings

Navigate to Settings → Spotify inside VIVI Music.
2

Tap Connect

Tap the Connect item in the Spotify account section. A bottom sheet titled SpotifyLoginSheet slides up containing an embedded WebView pointed at Spotify’s login page.
3

Sign in to Spotify

Complete the Spotify login flow inside the WebView. VIVI captures the sp_dc and sp_key session cookies automatically once you are authenticated. The WebView is then dismissed and your Spotify account name and avatar appear in the account card.
4

Load your sources

Once authenticated, VIVI calls viewModel.loadSources() to fetch your playlists and liked songs count from Spotify. The account card updates to show how many sources are available.

Selecting and importing playlists

After your sources have loaded, tap Select Sources to open the SpotifyPlaylistBottomSheet. This sheet lists all your Spotify playlists alongside your Liked Songs collection. Select the ones you want and confirm to begin the import. A progress dialog appears during the import showing:
  • The playlist name currently being processed.
  • A song counter (e.g. “Importing song 12 of 47”).
  • A linear progress bar that fills as each track is matched and saved.
You can cancel the import at any time; tracks already matched will be retained. Once the import completes the dialog shows a summary and an OK button. Imported playlists appear in Library → Playlists alongside your existing VIVI playlists.

Keeping playlists up to date

The Refresh button (the rotating sync icon) re-fetches your Spotify sources. It is enabled whenever you are authenticated and no import is in progress. Tapping it calls loadSources() again, which picks up any playlists you have added to Spotify since the last import. The YtmSyncKey preference tracks whether YouTube Music library sync is active, and SelectedYtmPlaylistsKey stores the set of YouTube Music playlist IDs you have chosen to keep synchronised.

Sync state preferences

Preference keyPurpose
SelectedYtmPlaylistsKeyStores the set of YouTube Music playlist IDs chosen for synchronisation
YtmSyncKeyBoolean flag that enables automatic re-sync with YouTube Music
SpotifySessionKeyPersists the authenticated Spotify session across app restarts

Disconnecting Spotify

Tap Logout in the Spotify account card. This calls viewModel.logout(), which clears the session cookies and resets the authenticated state. Your already-imported playlists remain in your VIVI library untouched.
Song matching is performed by searching YouTube Music for each Spotify track by title and artist name. The match is usually accurate, but for rare, regional, or remixed tracks the wrong version may be returned, or no match may be found at all. Review imported playlists if exact versions are important to you.
After importing, use the Refresh button periodically to pull in new playlists or tracks you have added to Spotify. Playlists already imported are updated in place rather than duplicated.

Build docs developers (and LLMs) love