Native streaming: unavailable-track guard pauses, but librespot keeps skipping through the whole queue
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Start by tracing the Unavailable arm in connect/src/spirc.rs alongside the escalation threshold in src/infra/player/events.rs, and check how the guard's pause interacts with Spirc's auto-advance and preload behavior. Done means that after three consecutive unavailable tracks, native playback stops requesting keys or files until the user starts playback again.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
When librespot can't play any track on an account (the error audio key 0 1 block, librespot-org/librespot#1649), the stampede guard from #282 doesn't stop playback. It pauses after 3 consecutive Unavailable events, but librespot keeps loading the next track, so it still runs through the whole queue at machine speed. In a user's log it went to 17 failed tracks in 43 seconds with no input in spotatui, and CDN file loads started failing with rate limited. In a second session it went to 42 failures and Spirc state updates got 429 Too Many Requests. It only stopped when the queue ran out.
Cause
Spirc answers every PlayerEvent::Unavailable with handle_next (the Unavailable arm in connect/src/spirc.rs), and handle_unavailable also preloads the next track. A paused load_track still requests the audio key and the file, so the Pause the guard sends (UNAVAILABLE_ESCALATION_THRESHOLD in src/infra/player/events.rs) doesn't break the loop. DeferredPlayerCommand::Stop wouldn't either as written: it only calls player.stop() and leaves Spirc's state alone.
To Reproduce
- Log in with an account affected by librespot-org/librespot#1649 (it mostly hits newer accounts).
- Start native playback of a playlist or album.
- Every track logs
error audio key 0 1thenSkipping to next track, and theconsecutive Ncount innative playback unavailablekeeps climbing past 3.
[17:59:16][spotatui::infra::player::events][INFO] native playback unavailable (track spotify:track:1JbrVh45evNhbm3R75aYzg, consecutive 3)
[17:59:16][spotatui_librespot_playback::player][INFO] Loading <I Really Want to Stay at Your House> with Spotify URI <spotify:track:7mykoq6R3BArsSpNDjFQTm>
[17:59:16][spotatui_librespot_core::audio_key][ERROR] error audio key 0 1
...
[17:59:35][spotatui_librespot_playback::player][ERROR] Unable to load encrypted file: Error { kind: ResourceExhausted, error: "rate limited for at least another 0 seconds" }
...
[17:59:55][spotatui::infra::player::events][INFO] native playback unavailable (track spotify:track:1Qtoq02RTZ4alrR7vJ4Lai, consecutive 17)
Expected behavior
After 3 consecutive unavailable tracks, native playback stops and no more keys or files are requested until the user starts something again.
Screenshots
N/A, log excerpt above.
Desktop (please complete the following information):
- OS: any
- Terminal: any
- Version: 0.42.0 (
spotatui-librespot0.8.3)
Additional context
The account-side key block is upstream and can't be fixed here. This issue is only about the guard. The fix probably belongs in the fork, either stopping Spirc's auto-advance after N consecutive unavailable tracks or exposing a Spirc stop the guard can call. The fork has issues disabled, so this one tracks it.
- Lingua principale
- Rust
- Stelle
- 1.4k
- Fork
- 238
- Merge medio
- 9h 21m
- PR unite (30g)
- 193
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di LargeModGames/spotatui
-
enhancement good first issue javascript
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
LargeModGames/spotatui#841 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
LargeModGames/spotatui#832 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
LargeModGames/spotatui#829 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
LargeModGames/spotatui#827 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
LargeModGames/spotatui#825 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di LargeModGames/spotatui
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
area: compat area: parsing bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
reubeno/brush#1526 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Volume eject does not refuse system, root or /home mountsForse già presa @bernardopg l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
spacedriveapp/spacedrive#3159 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100