mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-12 20:37:12 +02:00
When playing a song, the web player would sometimes briefly skip to a different song, attempt to play it, then snap back to the chosen track. Root cause: the music player can emit a PLAYER_SYNC_QUEUE carrying its previous (old) queue while it loads the newly selected one. Since #5441 widened reduceSyncQueue's hasPendingSwitch to keep playIndex alive whenever clear=true, that stale list was adopted into state with playIndex pointing at a track the user never chose. The library then played that track for an instant before the correct queue settled. Fix: when a switch is pending, only adopt a synced queue that actually contains the pending track (state.queue[playIndex], matched by trackId). A sync missing it is stale and is ignored, keeping the intended queue and pending switch alive so the next, correct sync is adopted normally. |
||
|---|---|---|
| .. | ||
| bin | ||
| build | ||
| public | ||
| src | ||
| .eslintignore | ||
| .eslintrc | ||
| .gitignore | ||
| embed.go | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| prettier.config.js | ||
| tsconfig.app.json | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.js | ||