You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Depends on Silo-Server/silo-server#4501 (the setting). #994 (Up Next from the end of the file) has merged, and main is merged into this branch.
Viewers cannot turn Up Next off on Android. Auto-Play Next Episode only stops the countdown; the card still opens before or at the end of every episode.
Show Next Up on the phone and TV now offers Off. With Off, the player opens no Up Next card before or at the end and starts no next episode; when playback ends it closes the way Back does. A shuffle still moves on, since the viewer asked for one.
Approach
Off writes playback.next_up_enabled false (settings revision 31, feat(settings): add a setting that turns Next Up off silo-server#4501) and leaves the stored seconds alone; choosing a time turns Next Up back on. One picker owns both keys, so Use profile setting clears both together.
The key is detected from the server's settings manifest, like the buffering quality mode. A server without it is never sent it: Off is hidden and Next Up stays on. A write made before the manifest is read is kept and sent again after the first refresh.
On the TV, an Up Next overlay the viewer opened by hand stays up at the end, without a countdown.
The bindings and the vendored settings contract carry next_up_enabled from feat(settings): add a setting that turns Next Up off silo-server#4501, which introduces it at revision 31 on top of server main. The vendored manifest.json and conformance.json are byte-identical copies of #4501's e812b87fa, and SettingKeys.kt is regenerated from it. SOURCE needs re-pointing at #4501's merged commit before this PR merges.
Validation
./gradlew testDebugUnitTest with main merged in: shared 2,526, android-shared 2,332, phone 1,016 and Android TV 1,415 tests, 0 failures. On the head, the diagnostics, settings-store and Next Up choice suites, the phone player view model suite and the full TV suite pass, and both apps build with assembleDebug.
Lint (lintDebug for all three modules, lintVitalRelease for both apps) passed with no new findings before main was merged in.
On phone and Android TV emulators against a server built from feat(settings): add a setting that turns Next Up off silo-server#4501: both pickers offer Off, and choosing it stores next_up_enabled = false as that device's value. With Off and Auto-Play on, an episode played past the 30-second prompt point to its end with no Up Next card. The player then closed, the server marked the episode watched, and the next episode did not start.
Checked by reading the code, not on a device: a TV overlay opened by hand with Off, and picture-in-picture at the end. With Off, the phone keeps the ended frame in picture-in-picture and leaves the player once picture-in-picture ends, unless playback was restarted from its controls meanwhile.
Review fixes on this branch, each with a phone test that failed before the fix where the phone fixture can reach it: when Next Up turns off while a card shows, a card before the end goes away as Keep Watching would, and one at the end (the finished card included) closes the player (nextUpTurnedOffBeforeTheEndClearsTheCardAndClosesAtTheEnd, nextUpTurnedOffWhileTheFinishedCardWaitsClosesThePlayer). A countdown armed before Off arrived closes instead of playing the next episode (nextUpTurnedOffDuringTheEndCountdownClosesInsteadOfAdvancing). On TV, only an overlay the viewer opened stays up at the end, and dismissing it there leaves the player. A seek back after playback ends keeps the player open when Next Up turns off afterwards or a slow next-episode lookup finishes, including when the plan gives no duration and when the seek came from the system media controls (nextUpTurnedOffAfterASeekBackFromTheFinishedCardKeepsPlaying, nextUpTurnedOffAfterTheSystemControlsLeaveTheEndKeepsPlaying). On a server without the key, choosing a time no longer pins the picker to this device (AndroidPlayerSettingsStoreTest). On TV, TvPlayerNextUpOffResolverTest covers a slow next-episode lookup that finishes after Off on a plan with no duration: a seek back keeps the player open whether the lookup or the Off collector runs first, and an end nothing moved from still closes. The other TV paths were checked by reading the code.
Phone and TV Settings → Playback → Show Next Up, and recordings of playback reaching the end with Off on each. Before, the picker had no Off and the card always opened. Phone, tablet and foldable share the phone settings layout and player.
Adversarial review: four independent reviews (gpt-6.2-sol, gpt-6.2-astra, claude-opus-5-5, claude-fable-5-2) of the branch diff for correctness, repository standards and the discussion's request, repeated on later cleanup; the real findings were fixed before opening
Note
Add viewer-facing "Off" choice for Next Up in phone and TV players
Adds a playback.next_up_enabled setting (default true) to the shared settings contract at revision 31, with server support detected from the manifest in PlaybackSettingsKeys.kt.
The Android and TV settings pickers show an Off option only when the server stores the key, or when a saved Off choice must stay visible; a time choice writes both keys, Off writes only the enabled key.
With Next Up disabled, non-shuffle playback shows no pre-end card and closes the player at the end, including when Next Up is turned off mid-countdown. Shuffle, watch-party, and viewer-opened overlays keep their existing handling.
AndroidPlayerSettingsStore.kt now tracks writes to manifest-detected keys as unconfirmed and clears device overrides when the active server is known not to store the key.
Behavioral Change: settings contract revision advances from 30 to 31; players exit at the end of an episode instead of showing a Next Up card when the setting is off. Check AndroidPlayerSettingsStore.setBufferingQualityMode, which now routes through the shared writeString helper.
…arker
The Show Next Up setting offers "At end" and "N seconds before end", but on
an episode with a credits marker both apps opened the card at the credits
start whatever was chosen. The TV player never read the setting at all.
Both players now open Up Next when playback crosses the chosen number of
seconds before the end of the file, and only when the stream ends for "At
end", as the iOS and tvOS player already does. Credits markers still drive
Skip Credits; skipping credits that run to the end ends the stream, which
opens the card. The TV settings screen now assumes the same 30-second
default as the settings store and the server.
FixesSilo-Server#910
…credits
Moving Up Next to the end of the file also moved the point at which the TV
player treats an episode as finished for the series page. Leaving during
the closing credits then opened the series on the episode just watched,
and leaving after an early prompt during the final scene opened it on the
next one.
Record the closing-credits crossing on its own again, and count the Up
Next prompt only when the stream has ended. Update the comments that still
described the credits-based trigger.
Viewers who would rather go back to the series at the end of an episode
cannot turn the Next Up card off; Auto-play Next only stops its countdown.
The Show Next Up picker on phone and TV now offers Off first. It writes
playback.next_up_enabled (settings revision 30), and choosing a time turns
Next Up back on. With Off the player opens no card before or at the end and
closes the way Back does when playback ends; a shuffle still moves on. One
control owns both Next Up keys, so Use profile setting clears them together.
A server whose settings manifest lacks the key is never sent it: the picker
hides Off and Next Up stays on there, as with the buffering quality mode.
The settings bindings and the vendored manifest move to revision 30.
The change adds a manifest-backed setting to control Next Up, adds Off and timing choices to Android and TV playback settings, and updates both players to handle playback end when Next Up is disabled.
Changes: Next Up setting and playback
Layer / File(s)
Summary
Define and store the Next Up setting shared/.../PlaybackSettingsKeys.kt, shared/.../SettingKeys.kt, shared/commonTest/resources/settings/v1/*, android-shared/.../PlayerSettingsStore.kt, android-shared/.../AndroidPlayerSettingsStore.kt, android-shared/.../AndroidPlayerSettingsStoreTest.kt, android-shared/.../DiagnosticsBundleBuilder.kt
The settings contract defines playback.next_up_enabled as a remote boolean that defaults to true. The Android store exposes its value and support status, writes the setting, and marks manifest-detected writes unconfirmed. The diagnostics allowlist includes the key.
Expose Off and timing choices in settings android-shared/.../NextUpChoice.kt, android-shared/.../NextUpChoiceTest.kt, androidApp/.../settings/SettingsViewModel.kt, androidApp/.../settings/SettingsPages.kt, androidApp/.../settings/PlaybackSettings.kt, androidTvApp/.../settings/TvSettingsViewModel.kt, androidTvApp/.../settings/TvSettingsScreen.kt
NextUpChoice defines Off and prompt-time options, selection, writes, and labels. Android and TV settings pass enabled and support state to their pickers and apply nullable choices.
Handle playback end when Next Up is disabled androidApp/.../player/PlayerViewModel.kt, androidApp/.../player/PlayerScreen.kt, androidApp/.../player/PlayerViewModelLoadOwnershipIntegrationTest.kt, androidTvApp/.../player/TvPlayerViewModel.kt, androidTvApp/.../player/TvPlayerScreen.kt
Both player ViewModels suppress regular-playback Next Up behavior when disabled and emit close requests at playback end. Their screens handle those requests. Android integration tests cover disabled Next Up behavior before playback end, during countdown, and while the card is open.
sequenceDiagram
participant AndroidPlayerViewModel
participant PlayerScreen
participant MediaController
participant TvPlayerViewModel
participant TvPlayerScreen
AndroidPlayerViewModel->>PlayerScreen: Emit closeAtEndRequests
PlayerScreen->>MediaController: Read position and duration
PlayerScreen->>AndroidPlayerViewModel: Report position and duration
TvPlayerViewModel->>TvPlayerScreen: Emit closeAtEndRequests
TvPlayerScreen->>TvPlayerScreen: Call stopPlaybackAndExit
Loading
Possibly related PRs
Silo-Server/silo-android#1036: Updates the vendored settings contract to revision 30, which is also updated by this change at revision 31.
Suggested reviewers:quick104, rxwatcher
Merge Risk: Low · up to 3bea5
Turning Next Up off now closes playback at the end on phone and TV, and a running countdown no longer advances to the next episode. A few rare edge cases remain where the player can close during resumed playback, such as unknown-duration items after a seek, or picture-in-picture after a late resolution. These are minor and recoverable; fixing them before merge is advisable but not urgent. The server dependency (#4501) and the movie behavior decision still need to be settled by the maintainers.
Security architecture risk: Low · up to 3bea5
A timed Next Up choice can be only partly saved if it is interrupted, or split between profiles if the active profile changes while it is being saved. The impact is limited to playback preferences; the review did not establish broader access or privilege changes.
Retained concerns
Low · architecture · inferred: A timed choice is not atomic or pinned to one settings owner. Interruption between the two writes can enable Next Up with the previous timing. If the active profile changes between writes, the timing can be saved to the newly active profile rather than the one where the choice began. The send-time authority check applies to each write independently, so it cannot reject the second write merely because the first used a different scope.
Security review details
Security Blast Radius
inferred — The identified ownership failure is limited to playback preferences on the device and the device-scoped settings rows of profiles that become active during the operation. The split write does not establish a way to act with an inactive profile's credentials.
Trust Boundaries and Controls
observed — The connected server's manifest determines whether the key is supported, not who may write it. The existing flusher separately checks the captured identity, profile token, profile ID, and server before dispatching an operation.
Resilience and Maintainability Implications
observed — End-triggered close uses the existing exit routines. On TV, the exit guard prevents repeated requests from repeating teardown. On phones, an exit deferred during picture-in-picture is skipped if the controller is ready or buffering when picture-in-picture ends.
Hardening Proposals
proposed — Capture the settings owner once per picker choice, apply both local values in one edit, and keep the original owner on both queued operations. Define how a partial server acknowledgement converges without letting one half follow a later profile switch.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "feat(player): let viewers turn Next Up off" matches the main change: an Off choice for Show Next Up on phone and TV, backed by the new playback.next_up_enabled setting, with the player clos…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description is specific and related to the changeset. It explains the problem (viewers cannot turn Up Next off on Android), the approach (an Off choice writing playback.next_up_enabled, manifest-g…
Full details: Title check
Explanation
The title "feat(player): let viewers turn Next Up off" matches the main change: an Off choice for Show Next Up on phone and TV, backed by the new playback.next_up_enabled setting, with the player closing at playback end instead of showing a card. It is concise, single-sentence, and specific.
Full details: Description check
Explanation
The description is specific and related to the changeset. It explains the problem (viewers cannot turn Up Next off on Android), the approach (an Off choice writing playback.next_up_enabled, manifest-gated support, unconfirmed writes), the TV and phone player behavior, validation runs, and risks such as the SOURCE re-point that waits on server PR #4501.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Visible changes lack reviewable evidence: Evidence: EVIDENCE_LINK is a placeholder, not an evidence URL or attached capture.
The Show Next Up picker adds Off (PlaybackSettings.kt, TvSettingsScreen.kt) on Android phone, tablet, foldable folded and open, and Android TV. No before/after captures are attached; provide same-screen pairs for each device configuration.
Turning Next Up off suppresses the card and automatic next episode, then exits at playback end (PlayerViewModel.kt, TvPlayerViewModel.kt) on phone, tablet, foldable folded and open, and TV. The PR says this was not captured; provide recordings of the end-of-playback behavior on each.
On TV, a manually opened Up Next overlay remains at the end without a countdown (TvPlayerViewModel.kt). No recording shows this; include it in the TV playback capture.
Name the device and build or commit for each capture. The reported emulator check and view-model tests do not show these visible changes. Suggested fix: replace the placeholder with the required screenshots and recordings, or attach them under Evidence.
Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.
The reason will be displayed to describe this comment to others. Learn more.
Timing choices do not override an inherited enabled setting
A later profile change to Off disables Next Up despite the device's explicit timing choice. Call store.setNextUpEnabled(true) whenever a timing choice is selected.
Prompt for LLM
File android-shared/src/androidMain/kotlin/org/siloserver/silo/common/settings/NextUpChoice.kt, lines 32-33:
Timing choices do not override an inherited enabled setting
Selecting a timing while the inherited profile value is enabled writes only the timing override, so a later profile change to Off disables Next Up despite the device's explicit timing choice. Write an enabled device override whenever a timing choice is selected.
Suggested code:
store.setNextUpEnabled(true)
store.setNextUpPromptSeconds(choice)
The reason will be displayed to describe this comment to others. Learn more.
Fixed in fa22e02. Where the server stores Off, choosing a time now writes next_up_enabled = true as well as the seconds, so the picker's choice is this device's whole choice. On a server without the key only a saved Off is turned back on, so the key is still never sent there. NextUpChoiceTest covers the writes.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update. Writing both values when the server supports the setting addresses the inherited-setting concern, while preserving compatibility with older servers. The added NextUpChoiceTest coverage is helpful.
I haven’t independently verified the commit or run the tests.
The reason will be displayed to describe this comment to others. Learn more.
Disabling Next Up leaves an active TV countdown running
An existing countdown can advance to the next episode after Next Up is disabled. Cancel nextUpCountdownJob and clear nextUpCountdownSeconds when handling the disabled setting.
Prompt for LLM
File androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/player/TvPlayerViewModel.kt, lines 5422-5424:
Disabling Next Up leaves an active TV countdown running
If Next Up is disabled after the automatic overlay has opened, the end event marks the overlay ended without canceling its existing countdown, which then automatically advances to the next episode. Cancel the countdown and clear its displayed value when handling the disabled setting.
Suggested code:
if (_uiState.value.showNextUp) {
nextUpCountdownJob?.cancel()
nextUpCountdownJob = null
_uiState.update { it.copy(nextUpVideoEnded = true, nextUpCountdownSeconds = null) }
}
The reason will be displayed to describe this comment to others. Learn more.
Not realistic: the overlay covers the TV screen while it counts down, so the viewer cannot reach Settings, and the setting is read when playback starts. Only a background settings refresh landing in that last minute or two could flip it. The branch exists for the overlay the viewer opened by hand, which has no countdown. Leaving it.
The reason will be displayed to describe this comment to others. Learn more.
Understood. The countdown scenario depends on a background settings refresh during a narrow window, while the intended manual-overlay case has no countdown. Given that tradeoff, leaving the code as-is is reasonable.
The reason will be displayed to describe this comment to others. Learn more.
Short files never trigger their before-end Next Up prompt
When the lead time is at least the file duration, playback cannot cross promptStart, so the card appears only at the end. Handle the initial playback sample when promptStart is at or before zero.
Prompt for LLM
File shared/src/commonMain/kotlin/org/siloserver/silo/domain/player/NextUpPrompt.kt, lines 22-23:
Short files never trigger their before-end Next Up prompt
When the configured lead time is at least the file duration, the prompt point is zero or negative and playback starting at zero can never cross it, so the card appears only at the end instead of before it. Handle the initial playback sample when the computed prompt point is at or before zero.
The reason will be displayed to describe this comment to others. Learn more.
Understood. This duplicates the finding on #994 and describes existing behavior on main: when a file is no longer than the configured lead time, Up Next appears at the end. It is not a new regression introduced by #995.
Choosing a time wrote only the seconds while Next Up was already on, so
next_up_enabled stayed inherited from the profile. Turning Next Up off for
the profile elsewhere then turned it off on this device too, although its
picker showed a choice of its own. Where the server stores Off, a time now
writes both keys.
…t point
An Up Next overlay the viewer opened by hand has no countdown. Once the
before-end point covered every episode, playback crossing it committed that
same overlay with a countdown, which advanced as soon as the stream ended.
The crossing now leaves a hand-opened overlay alone; the end still commits it
as before.
The closing-credits check that sets the series-page return also skips while
Play Now's handoff is running, as onApproachingEnd did before it moved.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… closes
A time chosen before the server's settings manifest was read wrote only the
seconds, so a profile that turned Next Up off later still turned it off on
this device. A time now always writes Next Up on as well; the flusher holds
that key until the manifest is read and drops it for a server without it.
With Off, the phone closed at the end without reporting the end position,
and the position ticker stops in the background, so the session could save
an earlier position. The close now reports the controller's position first.
On TV, a countdown left from before Off arrived no longer advances when the
stream ends.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The reason will be displayed to describe this comment to others. Learn more.
Review of this PR's own commits (9a0ef16, fa22e02) at fa22e02. Three findings; I'm fixing all three in a commit on this branch, so there's no need to change them yourself.
Fit: 7/10 · Readiness: 8/10 — conditional (assuming CI is green)
Show Next Up gains Off on phone and TV. With Off, the player shows no Up Next, starts no next episode, and closes at the end. Off is offered only where the server's settings manifest has playback.next_up_enabled. Main had moved on and conflicted in TvPlayerViewModel, so I merged it in (966f8d8), keeping main's UiText remote stop next to this branch's close flow.
Addressed on this branch
635f5ec: feat(settings): add a setting that turns Next Up off silo-server#4501 now introduces the key at revision 31 on top of server main. The vendored manifest.json and conformance.json are byte-identical copies of its e812b87fa, and SettingKeys.kt is regenerated with its settingsgen (only REVISION = 31 changed). This replaces the earlier hand merge.
3927ac8: on a server without the key, choosing a time no longer pins the picker to this device.
With Off, an episode that ends in picture-in-picture keeps its ended frame there, and the player closes once picture-in-picture ends. If playback was restarted from the window's controls in the meantime, the player stays open.
When Next Up turns off while a card shows, a card before the end goes away as Keep Watching would, and its countdown stops. A card at the end closes the player, including the finished card when there's no next episode and one left waiting on a slow lookup. A countdown armed before Off can no longer start the next episode.
On TV, only an overlay the viewer opened stays up at the end, and dismissing it there leaves the player.
"At the end" means playback ended and no seek has moved it since, and with a duration, the position at it too. Each player records the end until the next seek (7b762e7) or until Media3 leaves the ended state, which also covers seeks from the notification, media keys and stall recovery that skip the view model (bb46caf). So a seek back keeps the player open even on a plan with no duration, when Off arrives afterwards or a slow next-episode lookup finishes. Closing at the end also clears the pending end, so a stale one can't close playback restarted in picture-in-picture. The card's own ended flag is unchanged, so it reads as before.
9f9d2ae (test only): TvPlayerNextUpOffResolverTest drives TvPlayerViewModel with no source duration and a held next-episode lookup, as CodeRabbit asked on the TV thread. A seek back, from the system controls or through the view model, keeps the player open when Off arrives, whether the lookup or the Off collector runs first. An end nothing moved from still closes. The TV code held, so nothing else changed.
CodeRabbit's threads and Kody's PiP, finished-screen, seek-back and unknown-duration comments are answered in their threads with these commits, including the four CodeRabbit comments on 3bea593.
Maintainer decision: does Off apply to movies? Here, Off also closes the player at the end of a movie instead of showing the finished screen with On Deck. The contract note in #4501 describes episodes, the web player in feat(web): let Show Next Up be turned off silo-server#4503 applies Off to series episodes only, and feat(player): let viewers turn Next Up off silo-apple#1219 says "when the item ends". One rule should hold across all four clients: either episodes only, matching the contract and web, or every item, with the contract note and web widened to match.
Left as they are: a time's two writes are separate store calls, so a profile switch between them could split them. A settings read that crosses a newer Off write can show On until the next refresh; that predates this PR and applies to every server setting. A time chosen on a server without the key is sent once the server gains it, so this device stays On even if the profile is Off by then; that's intended, since a time is this device's whole choice. The settings flusher keeps no disk journal, so a write made just before the app is killed can be lost; that's existing design for every setting.
Validation
Tests on the final head (9f9d2ae): the TV unit suite (1,419, the 4 new resolver tests included) passes. On bb46caf, the only code change since: the phone unit suite (1,021) passes, the phone player view model suite (32) included. Both apps lint clean against their baselines and build with assembleDebug. The shared suite (2,530, including settings conformance at revision 31) and the android-shared settings, diagnostics and Next Up choice suites (106) pass from the re-vendor onward.
Failed before the fix: the older-server marker assertion in AndroidPlayerSettingsStoreTest, plus the phone tests nextUpTurnedOffDuringTheEndCountdownClosesInsteadOfAdvancing, nextUpTurnedOffWhileTheFinishedCardWaitsClosesThePlayer and nextUpTurnedOffAfterASeekBackFromTheFinishedCardKeepsPlaying (failed on 3bea593). nextUpTurnedOffAfterTheSystemControlsLeaveTheEndKeepsPlaying guards bb46caf's new state hook; it calls a method that didn't exist before, so it doesn't count as a test that failed on the base. The new TV resolver tests fail when any one guard is removed: the resolver's isAtEndOfPlayback() check, or the end-record reset in onPlaybackLeftEnd() or executeSeekTarget. Each failed on the code before its fix and passes after it.
Not run on a device: picture-in-picture, a seek from the system media controls, and the TV paths. The TV resolver race now has unit tests (9f9d2ae); the other TV paths were checked by reading the code. A live run can't choose which coroutine resumes first, so the race was tested in a unit test, not on an emulator. The earlier live run on phone and TV emulators against a #4501 server covers the main Off end, which these fixes don't change.
The page's picker and Off-end recordings still match: the review fixes change edge paths it doesn't show. Its notes list bb46caf's test results; 9f9d2ae adds only a test.
Council: both rounds used Sol (gpt-6.2-sol), Opus (claude-opus-5-5) and Gemini (gemini-4-neon) at medium effort. Round 1 on b48f48b: Sol 6/10, Opus 8/10, Gemini 8/10. Round 2 on 31647af: Sol 8/10, Opus 8/10, Gemini 9/10. The fixes listed above came from those rounds. Three findings were declined: the flusher journal (existing design), next-episode lookup still running with Off (it keeps the card ready if On returns), and Cast completion (it never showed Up Next, so Off changes nothing there). Round 2's remaining items are fixed in 33ac5cb through bb46caf, which no council round has read; the phone and TV suites cover them.
For the maintainers
Fit 7: viewers asked for this, and Apple, Roku and Web are adding the same setting. As a new setting it holds at 7, and the movie question is still open.
Readiness 8: the approach holds, the review's fixes are in with tests where the phone fixture reaches, and the board check ran. It stays conditional on #4501 merging first, and on picture-in-picture and the TV paths other than the resolver race being checked by reading the code only.
The evidence link is present for the picker, but the PR says the playback behavior was not captured.
With Next Up Off, playback suppresses the card and automatic next episode, then exits at the end; the prompt also now triggers at the configured lead time instead of at credits markers. Add recordings of these playback flows on Android phone, tablet, foldable folded and open, and Android TV.
On Android TV, include a recording showing a manually opened Up Next overlay remaining visible at the end without a countdown.
The linked evidence page should let reviewers verify the picker on phone, tablet, foldable folded and open, and TV.
Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
…1 at revision 31
silo-server#4501 now introduces playback.next_up_enabled at revision 31 on top of server main's revision 30, so the vendored manifest, conformance fixture and generated SettingKeys match that commit byte for byte instead of a hand merge. Re-point SOURCE at #4501's merged commit once it lands.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The reason will be displayed to describe this comment to others. Learn more.
Review of de577ed. Main has moved on and now conflicts in TvPlayerViewModel (main's remote stop carries UiText), so I merged it in and kept both sides. Two findings and one maintainer decision below. I'm fixing both findings in commits on this branch, so there's no need to change them yourself. I'm also fixing CodeRabbit's two threads and re-vendoring the settings contract from Silo-Server/silo-server#4501, which now uses revision 31. Replies in those threads follow with the commit.
The reason will be displayed to describe this comment to others. Learn more.
Maintainer decision: Off also closes the player at the end of a movie.
This branch runs for every item outside a shuffle, movies included, and TvPlayerViewModel does the same. With Off, a finished movie now closes the player instead of showing the finished screen with On Deck (the next == null path below). The contract note in Silo-Server/silo-server#4501 describes the end of an episode, and the web player in Silo-Server/silo-server#4503 applies Off only to series episodes and leaves a movie's end as it was. Silo-Server/silo-apple#1219 says the player closes "when the item ends", which reads as every item.
The options are to limit Off to episodes here and on Apple, matching the contract and web, or to keep it for every item and widen the contract note and web to match. I haven't changed this on the branch; it's for the maintainers to settle.
…key can't clear
A Show Next Up time also writes playback.next_up_enabled, which marks it as this device's own value. A server whose manifest lacks the key never answers for it, so the marker stayed and pinned the picker to this device. The refresh now drops the marker for a manifest-detected key that server lacks and keeps the unconfirmed mark, so the write still goes out once the server stores the key.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… countdown
With Off, the phone left the player route while still in picture-in-picture, which filled the window with the screen behind it; it now keeps the ended frame and leaves once picture-in-picture ends. A countdown armed before Off arrived still played the next episode on phone and TV; both now check Off again before an unattended advance and close instead. On TV, an Up Next that opened on its own before Off arrived now closes with the player at the end, and only one the viewer opened stays up.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
silo-triageBot
added
size/XL
500–999 added + deleted lines (all files); change volume, not priority.
and removed
size/L
200–499 added + deleted lines (all files); change volume, not priority.
labels
Nov 24, 2026
…er an Off end goes
In picture-in-picture, playback resumed from its controls after the end now keeps the player, and its next end asks again. On TV with Next Up off, dismissing an Up Next the viewer kept up at the end now leaves the player instead of stranding them on the ended frame.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…on the next episode
When the end of an episode showed the finished Up Next screen before the next episode resolved, and Next Up turned off meanwhile, the resolve dropped its saved trigger but left that screen up. Both players now close there, keeping only a TV overlay the viewer opened. The phone's Off end also drops a card or countdown left from before Off arrived, which picture-in-picture could otherwise keep alive.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… waits
Both players now recheck the visible end card when Next Up turns off: an automatic one with no countdown, or the finished card when there's no next episode, closes the player as Off would have at the end. A TV overlay the viewer opened stays. After picture-in-picture, playback restarted from its controls, playing or paused partway, keeps the player; only an ended or stopped player closes. On TV, dismissing an overlay closes only while the position is still at the end, since the ended flag outlives a seek back.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…efore the end
When Next Up turns off while an automatic card shows before the end, both players now dismiss it as Keep Watching would, stopping its countdown, and close at the end as Off does. A TV overlay the viewer opened stays.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ed flag
The ended flag outlives a seek back after the end, so Next Up turning off, or dismissing a TV overlay, could close a player the viewer had moved back into the episode. Both now also need the position at the duration. A plan with no duration falls back to the flag alone, so it can still close at the end.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.
Reviewing changes in Silo
Include the related issue, expected behavior, and validation steps in the PR description.
For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
Follow this repository's AGENTS.md and CONTRIBUTING.md.
Request another review with @kody start-review in a PR comment.
React with 👍 or 👎 to give feedback on individual suggestions.
Review settingsReview Options
The following review options are enabled or disabled:
Options
Enabled
Bug
✅
Performance
✅
Security
✅
Business Logic
❌
⚠️ 5 Kody Rule(s) were not evaluated
These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:
Validate download ownership before publishing subtitle bytes
Bind playback markers to the actual playing file
Share route-aware audio decisions and preserve original-format decoder fallback
Apply playback route eligibility consistently at admission and media loading
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
…a seek back
The card's ended flag outlives a seek back, and with no duration in the
plan the position check could not tell playback had left the end, so
turning Next Up off (or a late next-episode lookup) closed a playing
episode. Track the end until the next seek on phone and TV, gate every
close on it, and clear the pending end when the player closes.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…from it
A seek from the notification, a media key or another MediaSession client
reaches Media3 without passing through the view model, so the end record
stayed set and, on a plan with no duration, Off could still close the
resumed episode. Clear the record when Media3 leaves STATE_ENDED.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Drives TvPlayerViewModel with no source duration and a held episode
lookup. Off reaching nextUpEnabled before its collector runs keeps
playback open after a seek or a system-controls move off the end, and
still closes an end nothing moved from.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
silo-triageBot
added
size/XXL
1000–2999 added + deleted lines (all files); change volume, not priority.
and removed
size/XL
500–999 added + deleted lines (all files); change volume, not priority.
labels
Nov 24, 2026
Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.
Reviewing changes in Silo
Include the related issue, expected behavior, and validation steps in the PR description.
For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
Follow this repository's AGENTS.md and CONTRIBUTING.md.
Request another review with @kody start-review in a PR comment.
React with 👍 or 👎 to give feedback on individual suggestions.
Review settingsReview Options
The following review options are enabled or disabled:
Options
Enabled
Bug
✅
Performance
✅
Security
✅
Business Logic
❌
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
enhancementNew feature or requestneeds-reviewNeeds maintainer review to resolve uncertain classification, scope, or changed evidence.priority: P2Limited scope, workaround exists, or polishsize/XXL1000–2999 added + deleted lines (all files); change volume, not priority.stackedStacked on another open PR or branch
2 participants
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
Related issue: Silo-Server/silo-server Discussion #4443
Validation tasks: unblocks #347 C9, #348 C9
Other clients: Apple Silo-Server/silo-apple#1219; Roku Silo-Server/silo-roku#97; Web Silo-Server/silo-server#4503
Depends on Silo-Server/silo-server#4501 (the setting). #994 (Up Next from the end of the file) has merged, and main is merged into this branch.
Viewers cannot turn Up Next off on Android. Auto-Play Next Episode only stops the countdown; the card still opens before or at the end of every episode.
Show Next Up on the phone and TV now offers Off. With Off, the player opens no Up Next card before or at the end and starts no next episode; when playback ends it closes the way Back does. A shuffle still moves on, since the viewer asked for one.
Approach
playback.next_up_enabledfalse (settings revision 31, feat(settings): add a setting that turns Next Up off silo-server#4501) and leaves the stored seconds alone; choosing a time turns Next Up back on. One picker owns both keys, so Use profile setting clears both together.next_up_enabledfrom feat(settings): add a setting that turns Next Up off silo-server#4501, which introduces it at revision 31 on top of server main. The vendoredmanifest.jsonandconformance.jsonare byte-identical copies of #4501's e812b87fa, andSettingKeys.ktis regenerated from it.SOURCEneeds re-pointing at #4501's merged commit before this PR merges.Validation
./gradlew testDebugUnitTestwith main merged in: shared 2,526, android-shared 2,332, phone 1,016 and Android TV 1,415 tests, 0 failures. On the head, the diagnostics, settings-store and Next Up choice suites, the phone player view model suite and the full TV suite pass, and both apps build withassembleDebug.lintDebugfor all three modules,lintVitalReleasefor both apps) passed with no new findings before main was merged in.next_up_enabled = falseas that device's value. With Off and Auto-Play on, an episode played past the 30-second prompt point to its end with no Up Next card. The player then closed, the server marked the episode watched, and the next episode did not start.nextUpTurnedOffBeforeTheEndClearsTheCardAndClosesAtTheEnd,nextUpTurnedOffWhileTheFinishedCardWaitsClosesThePlayer). A countdown armed before Off arrived closes instead of playing the next episode (nextUpTurnedOffDuringTheEndCountdownClosesInsteadOfAdvancing). On TV, only an overlay the viewer opened stays up at the end, and dismissing it there leaves the player. A seek back after playback ends keeps the player open when Next Up turns off afterwards or a slow next-episode lookup finishes, including when the plan gives no duration and when the seek came from the system media controls (nextUpTurnedOffAfterASeekBackFromTheFinishedCardKeepsPlaying,nextUpTurnedOffAfterTheSystemControlsLeaveTheEndKeepsPlaying). On a server without the key, choosing a time no longer pins the picker to this device (AndroidPlayerSettingsStoreTest). On TV,TvPlayerNextUpOffResolverTestcovers a slow next-episode lookup that finishes after Off on a plan with no duration: a seek back keeps the player open whether the lookup or the Off collector runs first, and an end nothing moved from still closes. The other TV paths were checked by reading the code.Evidence
Evidence: https://evidence.siloserver.org/r/silo-android/pr-995/
Phone and TV Settings → Playback → Show Next Up, and recordings of playback reaching the end with Off on each. Before, the picker had no Off and the card always opened. Phone, tablet and foldable share the phone settings layout and player.
Risks
The
SOURCEre-point above, which waits on Silo-Server/silo-server#4501 merging.Checklist
AI Disclosure
Note
Add viewer-facing "Off" choice for Next Up in phone and TV players
playback.next_up_enabledsetting (default true) to the shared settings contract at revision 31, with server support detected from the manifest in PlaybackSettingsKeys.kt.AndroidPlayerSettingsStore.setBufferingQualityMode, which now routes through the sharedwriteStringhelper.Macroscope summarized 9f9d2ae.