Repository navigation
fix(playback): end a player an administrator stopped while it was unreachable - #2280
Conversation
…eachable When an administrator stops a session (or a pause or resume goes unconfirmed) and the player cannot be reached, the server ended the session after the deadline but left its playback attempt live. Progress kept succeeding, and a player that lost its stream replanned, got 404, and started a fresh session, so the stopped stream came back. The server now stops the attempt under an administrator stop id on the command fallback and on terminate. Progress and replan for such an attempt answer 410 playback_session_ended instead of the 404 that drives renewal, and the web player leaves playback with a notice when it gets that answer.
The web player left on 410 playback_session_ended only while reconnecting. A recovery replan, seek or track change that got the same answer showed a generic playback error instead.
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 10 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to The reviewed administrator-stop behavior is ready to merge after normal checks; no actionable issue remains from this review. Pre-merge checks |
|
|
Evidence is empty, but this changes the web player's exit behavior and adds “An administrator ended this playback session.” Please add before/after desktop and phone-width web captures (or show why phone width is unaffected), plus a short recording of an administrator stopping an unreachable player: playback ends with the notice and no replacement session appears in Activity. Identify the builds used. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85480a529f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A stop that arrived after the replan precheck reached the replan as a missing live session or a refused commit, both reported as 404, so the web player renewed into a fresh session. Re-read the attempt on a 404 and answer 410 when an administrator ended it. The web progress loop also ignores a 410 that arrives after the player moved to another session, so a late answer for the old session cannot end the new one.
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
Evidence updated: https://evidence.siloserver.org/r/silo-server/pr-2280/ The page now has before and after recordings at desktop (1440) and phone width (390). In each, the player can't reach its control socket and an administrator stops it, with Admin > Activity shown alongside. Before: the player reconnects and a new session appears in Activity about 15 s after the stop. After: about 12 s after the stop the player is back on the title page with "An administrator ended this playback session.", and Activity stays empty. Builds: before is The review fixes in 219007b are answered in their threads. AI disclosure: written with Claude Code (claude-opus-5-5). |
Problem
Related issue: #1205
Validation tasks: unblocks #1206 C2, #1208 C2, Silo-Server/silo-apple#330 C2, Silo-Server/silo-apple#331 C2, Silo-Server/silo-android#340 C2, Silo-Server/silo-android#341 C2
When an administrator stops a session while the player can't be reached over its control socket (it is reconnecting, on a flaky network, or too slow to answer within the deadline), the stop does not stick. The server ends the session after the deadline, but the player keeps playing:
404, and start a fresh session, so the stopped stream comes back in Activity.The same happens when a pause or resume is not confirmed in time, because those commands share the stop fallback. The manual promises that a disconnected player "may stop only when it next contacts the server". Today it never stops.
The cause is on the server: the fallback stops the live session but leaves its playback attempt live, so progress keeps succeeding, and the
404it answers afterwards is the signal clients use to renew after an expiry or a server restart.Approach
410 playback_session_endedinstead of404. Expired or otherwise stopped attempts still answer404, so restart-resilient renewal is unchanged, and a stop the client made first keeps its own receipt. No migration: the stop id is read from the existing stop receipt.410from progress or any replan (including the reconnect path) it leaves playback with the notice "An administrator ended this playback session." instead of renewing or showing an error.docs/playback-api.mdanddocs/admin-api.mddescribe the new answer. jellycompat is not affected: Jellyfin-protocol sessions have no control socket, and their stop already revokes the stream.Merge this before the client pull requests; they are harmless without it.
Validation
VideoPlayer: pass.make lint-changed: no issues.make lint-changed, web lint, format, build and budget,make test-weband everyverify-*target pass.make test-gohas failures that occur the same way on unmodifiedmainon the macOS machine used (hardware-acceleration probes, the Chromaprint preflight,TestAdminResourceCapabilitiesAndScope, one transcode-segment timing test,TestAdminSubtitleListPageDB). Database-backed tests for the changed packages pass against PostgreSQL.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-2280/
Risks
Apple and Android builds without the client change get
410instead of404on progress and replan for a session an administrator ended, and handle it as an unrecognized error. They were not tested against this server change; this case only arises after an administrator stop the player missed.Checklist
AI Disclosure
gh), Playwright, Xcodexcodebuild/simctl, Android emulator andadbclaude-opus-5-5)/code-review, medium) covered this branch with the Apple and Android client branches. It found that the web player handled the410only while reconnecting; that was fixed with a test so every replan path leaves. This was an AI self-review; no independent human review is claimed.