Skip to content

fix: skip tracks Spotify refuses an audio key for instead of freezing#319

Open
JaragonCR wants to merge 1 commit into
devgianlu:masterfrom
JaragonCR:authfailskip
Open

fix: skip tracks Spotify refuses an audio key for instead of freezing#319
JaragonCR wants to merge 1 commit into
devgianlu:masterfrom
JaragonCR:authfailskip

Conversation

@JaragonCR

Copy link
Copy Markdown

Spotify makes a per-track, context-dependent decision on granting the legacy AES audio key. License-gated tracks are refused (AesKeyError, e.g. code 1) during ordinary playlist/transfer playback even though they play on official clients, which establish a licensed context. go-librespot only implements the legacy key path, so a refused track currently freezes the player with no way forward.

Treat a refused key (audio.KeyProviderError) like restricted/unsupported media: skip forward to the first playable track. Covers all load paths — loadContext, transfer/cast (via a shared loadCurrentTrackOrSkip helper), and advanceNext — and bounds the forward walk with consecutiveUnplayableSkips (cap 50) so a fully-gated or RepeatingContext context advances to the first playable track instead of looping forever.

This is a mitigation; the real fix is implementing the modern PlayPlay license flow which is currently impossible due to takedowns.

Spotify makes a per-track, context-dependent decision on granting the
legacy AES audio key. License-gated tracks are refused (AesKeyError,
e.g. code 1) during ordinary playlist/transfer playback even though they
play on official clients, which establish a licensed context. go-librespot
only implements the legacy key path, so a refused track currently freezes
the player with no way forward.

Treat a refused key (audio.KeyProviderError) like restricted/unsupported
media: skip forward to the first playable track. Covers all load paths —
loadContext, transfer/cast (via a shared loadCurrentTrackOrSkip helper),
and advanceNext — and bounds the forward walk with consecutiveUnplayableSkips
(cap 50) so a fully-gated or RepeatingContext context advances to the first
playable track instead of looping forever.

This is a mitigation; the real fix is implementing the modern PlayPlay
license flow. Tracked separately.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant