Playback stops when the next track fails to resolve
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- perl
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Perl
- スター
- 1.8k
- フォーク
- 389
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 10
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
LMS-Community/slimserver のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 67/100
LMS-Community/slimserver#1742 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
LMS-Community/slimserver#1555 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
LMS-Community/slimserver#1744 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Serve a static FLAC DASH manifest as a FLAC stream対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
LMS-Community/slimserver#1741 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
compatibility
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
LMS-Community/slimserver#1739 · コメント 6 件 ·
メンテナーはふだん 1 日以内に返信
LMS-Community/slimserver の issue をすべて見る
似ている issue
-
area:cpan-port area:performance bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
fglock/PerlOnJava#2230 ·
メンテナーはふだん 1 日以内に返信
-
Make logo .svgオープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
larchanka/ppc-code-ai-agent#38 ·
メンテナーはふだん 1 日以内に返信
-
[doc] perlsub wrongly says that `"sub { ... }" creates a new subroutine each time it is executed'オープンdocumentation Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
メンテナーはふだん 1 日以内に返信
-
docs(api): /api/v3/external_sources spec is missing lc and section_title対応中かも @subhwastaken が今日担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
openfoodfacts/openfoodfacts-server#15626 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100