Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Native streaming: unavailable-track guard pauses, but librespot keeps skipping through the whole queue

Aperta
#537 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
cli

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

  1. Log in with an account affected by librespot-org/librespot#1649 (it mostly hits newer accounts).
  2. Start native playback of a playlist or album.
  3. Every track logs error audio key 0 1 then Skipping to next track, and the consecutive N count in native playback unavailable keeps 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-librespot 0.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

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di LargeModGames/spotatui

Tutte le issue di LargeModGames/spotatui

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.