Spotify source plugin #85

Closed
opened 2026-10-16 16:55:17 +02:00 by SBDeveloper · 4 comments
Owner

Spotify source plugin. Design settled in a grilling session; see ADR 0020 (host engine: Soloist on Linux, librespot in an opt-in build) and ADR 0021 (Spotify plugin).

  • #86 Host: spotify_engine capability with librespot backend (opt-in build)
  • #91 Host: Soloist backend for spotify_engine on Linux
  • #87 Host: loopback listener for Spotify playback login
  • #88 Spotify plugin: Web API Catalog, Library, playlists, Favourites
  • #89 Spotify plugin: login, streaming and Quality cap
  • #90 Spotify: build secret, CI, Android, registry release, README risks
Spotify source plugin. Design settled in a grilling session; see ADR 0020 (host engine: Soloist on Linux, librespot in an opt-in build) and ADR 0021 (Spotify plugin). - [ ] #86 Host: spotify_engine capability with librespot backend (opt-in build) - [ ] #91 Host: Soloist backend for spotify_engine on Linux - [ ] #87 Host: loopback listener for Spotify playback login - [ ] #88 Spotify plugin: Web API Catalog, Library, playlists, Favourites - [ ] #89 Spotify plugin: login, streaming and Quality cap - [ ] #90 Spotify: build secret, CI, Android, registry release, README risks
Author
Owner

Decisions from grilling:

  • Private Spotify protocol via librespot, optional registry plugin, Premium only, README risk wording (same stance as Deezer, ADR 0001).
  • Host embeds librespot behind a Cargo feature; plugin stays HTTP-only and calls one spotify_engine host function for the passthrough Ogg stream (ADR 0020). Works on all platforms incl. Android.
  • Web API for search, Library, playlists, Favourites. Liked Songs, saved albums and followed artists mirrored both ways; playlists as Linked Playlists, Spotify-owned read-only; ISRC on every Track.
  • Two credentials: Web API token (browser OAuth, spotify:// callback opt-in off Linux, paste fallback) and playback credential (loopback listener in host).
  • Build-time client ID (ADR 0008 style) with optional user override.
  • Quality cap: Standard 160, High 320, no Lossless.
  • Offline via the generic cache, README notes the risk.
  • Radio deferred (recommendations endpoint closed to newer apps).
  • Music Assistant does the same (librespot for audio, Web API for the rest).

Open check: Spotify's current developer-mode limits for new apps, and that the librespot crates embed cleanly as a library.

Children: #86 #87 #88 #89 #90

Decisions from grilling: - Private Spotify protocol via librespot, optional registry plugin, Premium only, README risk wording (same stance as Deezer, ADR 0001). - Host embeds librespot behind a Cargo feature; plugin stays HTTP-only and calls one `spotify_engine` host function for the passthrough Ogg stream (ADR 0020). Works on all platforms incl. Android. - Web API for search, Library, playlists, Favourites. Liked Songs, saved albums and followed artists mirrored both ways; playlists as Linked Playlists, Spotify-owned read-only; ISRC on every Track. - Two credentials: Web API token (browser OAuth, `spotify://` callback opt-in off Linux, paste fallback) and playback credential (loopback listener in host). - Build-time client ID (ADR 0008 style) with optional user override. - Quality cap: Standard 160, High 320, no Lossless. - Offline via the generic cache, README notes the risk. - Radio deferred (recommendations endpoint closed to newer apps). - Music Assistant does the same (librespot for audio, Web API for the rest). Open check: Spotify's current developer-mode limits for new apps, and that the librespot crates embed cleanly as a library. Children: #86 #87 #88 #89 #90
Author
Owner

Revised after reading Music Assistant's Spotify provider and Spotify's Soloist docs:

  • Audio engine is the host's (ADR 0020): Soloist on Linux (Spotify's official headless client, user's own API key, never bundled, builds expire after 90 days), librespot in a separate opt-in unofficial build elsewhere. Official releases ship neither.
  • Open: Spotify's docs do not say whether capturing Soloist output into another player is allowed. #91 starts by confirming that.
  • Offline stays allowed through the generic cache; README notes the risk.
  • Legal: librespot path likely breaks Spotify's terms; have a lawyer review before publishing (in #90).
  • New ticket #91 (Soloist backend); #86, #87, #89, #90 rewritten to match; #89 is blocked by #86, #87 and #91.
Revised after reading Music Assistant's Spotify provider and Spotify's Soloist docs: - Audio engine is the host's (ADR 0020): Soloist on Linux (Spotify's official headless client, user's own API key, never bundled, builds expire after 90 days), librespot in a separate opt-in unofficial build elsewhere. Official releases ship neither. - Open: Spotify's docs do not say whether capturing Soloist output into another player is allowed. #91 starts by confirming that. - Offline stays allowed through the generic cache; README notes the risk. - Legal: librespot path likely breaks Spotify's terms; have a lawyer review before publishing (in #90). - New ticket #91 (Soloist backend); #86, #87, #89, #90 rewritten to match; #89 is blocked by #86, #87 and #91.
Author
Owner

All child tickets implemented on spec/85-spotify-source, code-reviewed, review fixes merged. Open: #90 lawyer review; Soloist ignores the Quality cap (no bitrate flag); nothing verified against real Spotify/Soloist/librespot.

All child tickets implemented on `spec/85-spotify-source`, code-reviewed, review fixes merged. Open: #90 lawyer review; Soloist ignores the Quality cap (no bitrate flag); nothing verified against real Spotify/Soloist/librespot.
Author
Owner

Merged to main by owner.

Merged to main by owner.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
SBDeveloper/medley#85
No description provided.