Repository navigation
Conversation
An explicit version pick reached `/playback/start` as `file_selection: "auto"` whenever playback began from an item detail page. The action bar passed the flag, but `buildWatchLocationState` dropped it on the way to the watch route, and `WatchRoute` rebuilt the request from the URL, which names a file but not why it was chosen. The player therefore treated every detail-page start as the server's choice: it sent `auto`, showed Auto checked in the version menu, and armed cross-version fallback. Carry the flag through the location state and the route, and include it in the request key so a route sync cannot fold a pinned start into an Auto one. A reload keeps only the remembered row in `silo-requested-version`, so the store now records whether the viewer named that row. The detail page and the watch page pin a remembered row only when they can still tell it is the viewer's; a row an Auto start played stays a hint and stays substitutable. The player reports the standing of a row it commits, and its Auto entry reports the row being played as no longer pinned.
Collaborator
Author
|
Superseded by #459, which contains this change plus the rest of the playback reliability bundle. Closing to keep the review surface to one PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A version picked on an item detail page reaches
/playback/startasfile_selection: "auto".Measured on the deployed build in Chrome: every start issued from the detail page carried
autoeven when a version was explicitly picked in the action bar, and the player's version menu showed Auto checked in that state. 8 of 12 starts played a different file than the one selected, including a 34 GB release with 2 audio tracks and 4 PGS subtitle tracks that played as a row with one audio track and SRT only.The action bar passed the flag into the start request, but it never reached the watch route.
buildWatchLocationStatedropped it, andWatchRouterebuilds the request from the URL, which namesfileIdbut not why the row was chosen. Every detail-page start was therefore reconstructed as server-owned, which also re-armed cross-version fallback.Related issue: N/A
Validation tasks: N/A
Approach
Carry
explicitFileSelectionin the router location state and read it back in the watch route, and include it in the watch request key so a route sync cannot fold a pinned start into an Auto one.After a reload the remembered row survives but the click that chose it does not, so
silo-requested-versionnow records whether the viewer named that row. The detail page and the watch page pin a remembered row only when the store says the viewer named it and it is still the row being started. A row an Auto start played stays a hint and stays substitutable; entries written before the flag existed read as hints.The player reports the standing of a row it commits, and the version menu's Auto entry reports the row being played as no longer pinned, so the menu and the store agree.
Refusals behave as before: an explicit start that the server refuses surfaces the existing error card that points at the version list, and with Auto armed the server still substitutes and the client still falls back across versions.
Validation
tsc -b: clean.make verify-local-paths: passes.format:checkpass.make lint-changedfails in this environment because it falls back to full-treegolangci-linttypecheck and the host lackslibvips/cgo forinternal/imageutil; the change touches no Go. Pushed with--no-verify; CI runs the same gate with the toolchain present.explicitFileSelection), and the session now sendsfile_selection: "explicit"for a picked row.Evidence: none.
Risks
The wire value for starts from item pages changes from
autotoexplicitwhen the viewer picked the row. Explicit starts are refused rather than substituted when the picked file cannot play on the device, and the viewer gets the existing "try another version" card. That is what the pick is supposed to mean.Stored entries from before this release read as hints, so upgrading does not pin anything by itself.
No migration, protocol, or Jellyfin-surface change.
Follow-up
Playback restarts from 0 s around 110-120 s with no API call (
media.src=->currentTime=0->load()->play()), which is a different defect in the same area and is not fixed here. The only code that assigns the media source is the transport-init effect inweb/src/player/components/VideoPlayer.tsx(video.src = ...in the native-HLS and direct-play branches, teardown at the end of the effect). That effect re-runs onplanRevisionplus a set of callback identities; a plan revision implies a server answer, so the trigger is one of the identity inputs or a remount, and pinning it needs a live repro with a dependency trace. It should get its own issue rather than a blind change.Checklist
AI Disclosure
deepseek-v4.1-flash:1017Posted by an AI agent (Muse Spark, OpenCode harness).