Playback stops when the next track fails to resolve
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- perl
- Ambito
- audio-video-rtc
Direzione di ricerca
Start in Slim::Player::StreamingController::_NextIfMore (around line 1012) and _RetryOrNext, the two places counting songqueue entries, then read _getNextTrack and _nextTrackError to see how a song becomes STATUS_FAILED. Reproduce with the playlist add sequence above and player.source at INFO, watching for "streaming track not started yet". Done means entry 2 is skipped and entry 3 plays, and the large-buffer and sync-group cases the suggested grep change leaves untested are checked too.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Disclaimer:
Analysis and reproduction have been made with Claude-code.
Playback stops when the next track fails to resolve
If the next track fails while the current one plays, LMS does not skip to the track after it. It logs "streaming track not started yet" and playback stops when the current track ends. Starting the failing track directly works: LMS skips it as expected.
Steps to reproduce (no plugins needed)
- On one player, queue a local file, an unreachable URL and another local file, then start the first:
playlist add file:///music/1.wav playlist add http://127.0.0.1:1/unreachable.mp3 playlist add file:///music/3.wav playlist index 0 - Let the first track play to its end.
Expected: LMS skips entry 2 and plays entry 3.
Actual: playback stops at entry 2. server.log with player.source at INFO:
Slim::Player::Song::getNextSong (246) scanning URL http://127.0.0.1:1/unreachable.mp3
Slim::Player::StreamingController::_NextIfMore (1012) streaming track not started yet, will wait until then to try next track
A missing local file as entry 2 is skipped correctly, because it fails later, in _Stream, which removes failed songs from the queue. We hit the bug with Deezer tracks that have no streaming rights (plugin getNextTrack calls the fail callback): themmm/lms-deezer#11.
Root cause
_getNextTrackputs the next song at the head ofsongqueuebefore callinggetNextSong(Bug 10841). Its cleanup only pops failed or finished songs from the tail.- When
getNextSongfails,_nextTrackErrormarks the songSTATUS_FAILEDand firesNextTrackError→_NextIfMore. The failed song is still atsongqueue[0], next to the playing song. _NextIfMorecounts 2 songs and waits for the streaming song to start. That song never starts, so nothing fetches the next track, and the player stops at the end of the current track._RetryOrNexthas the same check.
The check came with a0a62d354 (PR #985). From reading the code: until 6fea62b22f (the fix for #1214), _NextIfMore still called _getNextTrack unconditionally after the check, so this case did not stop playback; since then the check is the only path.
Affected: reproduced on 9.1.2 (Docker lmscommunity/lyrionmusicserver:stable), 4 of 4 runs. StreamingController.pm is identical in 9.1.0 and public/9.2.
Possible fix
Leave failed songs out of the count in _NextIfMore and _RetryOrNext:
- if (scalar @{$self->{'songqueue'}} < 2) {
+ if (scalar(grep { $_->status() != Slim::Player::Song::STATUS_FAILED } @{$self->{'songqueue'}}) < 2) {
With this change on 9.1.2, LMS skips entry 2 and plays entry 3 (2 of 2 runs); the existing cleanup in _Stream (bug 12653) then drops the failed song. A song that is still streaming is not STATUS_FAILED, so the large-buffer case the check was added for should keep waiting. Not tested: that case, and sync groups.
- Lingua principale
- Perl
- Stelle
- 1.8k
- Fork
- 389
- Merge medio
- 1g 4h
- PR unite (30g)
- 10
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Nessuna 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 LMS-Community/slimserver
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 67/100
LMS-Community/slimserver#1742 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
LMS-Community/slimserver#1555 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Serve a static FLAC DASH manifest as a FLAC streamForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 42/100
LMS-Community/slimserver#1741 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
compatibility
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
LMS-Community/slimserver#1739 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Scanner silently skips NFSv4 ACL-readable music directories due to Perl -r _ check (9.1 / 9.2 dev)Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
LMS-Community/slimserver#1734 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di LMS-Community/slimserver
Issue simili
-
area:cpan-port area:performance bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
fglock/PerlOnJava#2230 ·
I maintainer di solito rispondono entro 1 giorno
-
Make logo .svgApertadocumentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
larchanka/ppc-code-ai-agent#38 ·
I maintainer di solito rispondono entro 1 giorno
-
[doc] perlsub wrongly says that `"sub { ... }" creates a new subroutine each time it is executed'Apertadocumentation Needs Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
I maintainer di solito rispondono entro 1 giorno
-
docs(api): /api/v3/external_sources spec is missing lc and section_titleForse già presa @subhwastaken l’ha presa oggi. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
openfoodfacts/openfoodfacts-server#15626 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100