Skip to content

Library & Sync

The provider syncs the user’s library between Zvuk Music and Music Assistant in both directions.

TypeZvuk → MAMA → Zvuk
Tracks
Albums
Artists
Playlists

On first connect and on every MA library refresh:

  1. The provider fetches the user’s collection: lists of track, album, artist, playlist IDs
  2. IDs are split into batches of 50 (API limit)
  3. Full data is fetched for each batch
  4. Objects are parsed and added to the MA library
Action in MAWhat happens in Zvuk
Add track to librarylike_track()
Remove trackunlike_track()
Add albumlike_release()
Remove albumunlike_release()
Add artistlike_artist()
Remove artistunlike_artist()
Add playlistlike_playlist()
Remove playlistunlike_playlist()

Beyond sync, full playlist management is supported:

OperationSupport
Create playlist
Add tracks to playlist
Remove tracks from playlist
  • Errors on library add/remove return False instead of raising (don’t interrupt MA)
  • Library sync is not cached — each MA request returns fresh data from Zvuk