Repository navigation
Conversation
Subtitle appearance and timing were always written at profile_device scope, and every appearance edit silently turned on the device override. A style set on the phone never reached the TV, and the settings copy said "for this profile on this device". Appearance edits (phone settings, the in-player style sheet, TV settings) now save at profile scope. A device keeps its own subtitles only through the explicit "Only on This Device" toggle, now shown on the phone too: while it is on, appearance and timing edits go to profile_device; turning it off deletes this device's rows. A profile save also deletes a stale device row, so the saved value is the one on screen. Turning the toggle on pins the appearance on screen, as on Apple. player.subtitle_sync_ms saves at profile scope on servers at manifest revision 18 or later and stays device-scoped below that, decided at send time like the text-opacity gate and held while the revision is unknown. Queued writes now carry their scope with their profile, so a profile write is never sent as a device write or to another profile, and a device write queued after a profile save is not deleted by it. Includes the regenerated settings bindings (manifest revision 18).
The in-player Sync page said nothing about where the delays are kept, and the subtitle delay is now saved for the profile on every device while the audio delay stays on this device. The subtitle delay now reads "Saved for this profile on all devices", or "Only on this device" when Only on This Device is on or the server stores timing per device only (manifest revision below 18). The audio delay reads "PCM audio only · This device".
A profile save that also clears this device's row could fail while the viewer turned on "Only on This Device" and set a device value. The device write landed, then the failed profile save was queued again with its device clear intact, and its retry deleted the newer device value. When a failed op is queued again, a profile save now drops its device clear if a device write for the same profile and key was handled after it failed, or is still queued. The profile value is still retried. This is the rule the queue already applied to a profile save that had not been sent yet.
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:
|
|
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 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… would drop Turning "Only on This Device" off while the server revision was unknown (offline) skipped the subtitle timing clear for good, so the device delay kept overriding the profile's. The clear is now queued gated on revision 18 and held until the revision is known; below 18 it is dropped, as the device row is the only timing there. It is decided in the toggle's edit transaction, so a timing edit made after it is never cleared. A second profile edit inside the debounce, or made while the first one waited to retry, replaced the first one's device clear with false, and the stale device row kept outranking the saved value. The clear now carries over unless a device write came in between. A failed device clear after a landed profile PUT retried the PUT too, which could put this value back over a newer one saved elsewhere. Only the clear is retried now. A timing save queued before the revision was known that fell back to the device row (revision 17) and failed was retried over a newer device write made after the revision was learned. It is now dropped when a newer device write supersedes it.
The phone kept its own copy of subtitle auto-selection, which let a forced text track outrank the full-dialogue track whenever "Show forced subtitles" was on. The shared resolver the TV player and the TV detail page use records the product decision (2026-08-16) that forced never outranks full dialogue when subtitles are wanted, so the two apps started the same file on different tracks. The phone now hands its rows to the shared resolveAutoSubtitle, keeping only its own hearing-impaired reading of the runtime label, source and URL. A parity test checks the phone and the shared resolver land on the same row across modes, audio languages and the forced toggle.
On a file whose default audio track is not the profile's language, TV playback started with full subtitles where only the forced track belonged. Dual Audio (German default, English chosen for the profile) played English audio with "English SRT" on, while web and phone showed only "English Forced". The TV fallback ranked subtitles against the audio Media3 reported as selected in its first track snapshot. That is still the file's default (German) until the planned English track is switched in, so English audio looked foreign. The fallback now uses the audio this playback is set to play (the planned or chosen catalog track), and reads the mounted selection only when that is unknown, as the phone already does.
With subtitles set to Off (for a series or the profile) and "Show forced subtitles" on, the phone started the next episode with nothing on screen, while web and TV showed the forced line for the foreign-language dialogue. The TV settings copy and Apple both promise forced subtitles "even when subtitles are off". The shared resolver turned mode "off" straight into Disable, and the phone's automatic start applied that over the forced track the plan had chosen. Mode "off" now selects the forced track in the language of the audio that will play when forced subtitles are on, and nothing when there is none (web parity). The phone, the TV fallback and the TV detail preview all use this rule. Turning subtitles Off during playback is still fully off for that playback, since that path does not go through the resolver.
A subtitle track or Off picked in the player was stored only in this
device's per-file memory. The next episode, a relaunch on another file
or another device of the same profile went back to automatic, and the
server never learned of the choice.
A manual pick now goes to PUT /api/v2/subtitle-prefs/{id}, keyed by the
series id for an episode and the item's own content id for a movie, as
on the web and Apple: a track sends its language, combined index, mode
"always" and track signature; Off sends language "", index -1 and mode
"off". show_forced_subtitles is never sent, so the profile's forced
toggle is not pinned on the series. Choosing Auto on a detail page sends
DELETE. This covers the phone and TV players (including remote-control
picks) and both detail-page pickers.
Initial selection follows the server's answer. The watch and item
details now decode effective_subtitle_track_signature; the shared
resolver selects the track that matches it exactly (unless subtitles are
off) and otherwise uses it to break ties within the wanted language,
before the existing language and mode rules. The TV detail page's Auto
preview, which TV playback starts from, now uses the item's effective
subtitle fields too. Online, this device's per-file memory may only
restore that same choice (same language and forced flag), so a reset
made on another device is not undone; offline it restores as before.
Writes go through an app-scoped queue that captures the acting profile
when the choice is made, sends at once, retries network and 5xx failures
with backoff and on the next write, and drops a write whose profile is
no longer active rather than sending it to another.
…t differently Reopening an episode whose subtitle track had last played from inside the container started with subtitles off. The per-file memory holds that track as an embedded identity, but the next session's first plan lists the same server track as a sidecar. The restore only matches identities of the same form, so it missed. Because a remembered choice was present, automatic selection was skipped too, and nothing turned subtitles on. How a server track reaches the player is the server's per-session choice, not part of the viewer's. The restore now also accepts the one row with the same server track id when the forms differ. The id is exact, so this is not a metadata guess, and another file's track never matches.
…ver yet A pick whose PUT failed and was waiting to retry was lost when the item was reopened. Nothing flushed the queue, so playback started from the server's older choice, and the per-file memory of the new pick was filtered out against that older choice. Opening an item now gives a queued choice a short chance to land (up to 1.5 s) before the phone and TV starters read the watch detail. A choice that is still unsent (queued, in flight or waiting to retry) for this profile and series is laid over the server's effective subtitle fields: a track becomes its language, mode "always" and signature; Off becomes mode "off"; Auto drops the series signature. The phone player, the phone detail restore and the TV detail Auto preview use the same overlay.
…hide A load's flush that hit its 1.5 s timeout mid-send dropped the choices it had taken off the queue: they stayed "unsent" but nothing sent them again. They are now queued again and retried. A pick that landed during that flush stopped counting as unsent, so the watch detail read before the flush started playback from the server's older choice. The choice still applies to that detail. A pending reset to automatic kept the served mode and language, so a series set to Off stayed off until the delete landed. It now clears them, and the starters fall back to the profile's. Online, the per-file memory of an SDH track restored itself against a plain series choice in the same language. A known SDH flag must now agree too.
5b3f861 to
8ac4c2a
Compare
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:
|
…retries per write A subtitle timing clear gated on revision 18 took the slot of an unsent device write. Below 18 the clear is dropped, so the edit was lost and the next refresh put the old server value back. The clear now keeps the write it replaced and sends it when the server turns out to be below 18. Failures and device writes in one drain were ordered per pass, so a device write later in the same snapshot looked no newer than a failed profile save before it. Its retry could then delete or overwrite that newer device value. They are now ordered per write.
…during it When a profile save had landed and the follow-up device clear threw (a cancelled flush), the whole save was requeued. Its retry replayed the profile value and could overwrite a newer one saved from another device. Only the clear is retried now.
Picking the same subtitle again while the first save waited (offline, or before its retry) left the earlier copy marked unsent: the queued ops compared equal, so the unsent map never took the new one, and settling the new one by reference missed it. The landed pick then kept overriding the server's choice. Ops now compare by reference.
…e switch The TV detail page keeps its view model across a profile switch, and the unsent-picks overlay it collects only changed when the queue did. A pick the old profile had not sent yet kept being laid over the new profile's details. The overlay now clears when a switch starts and is worked out again for the new profile when it ends.
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:
|
A revision-gated profile save held while the revision is unknown is now marked when this device writes its own value after it, and dropped if it then resolves to the device row. A failed device write kept by a revision-gated clear now retries inside that clear, so the retry checks the revision again. (cherry picked from commit 37914e5)
The shared Auto resolver folded only seven ISO 639-2 codes, so after the phone moved onto it a preference of "it" no longer matched an "ita" track. It now uses the full table the phone used before. (cherry picked from commit 1a9d5b2032c3f03ec0e604c188b6143a31a146a4) (cherry picked from commit 0b78709)
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:
|
|
The evidence link and description cover phone, tablet, and Android TV emulator testing, but do not identify foldable captures. Please ensure the linked evidence includes:
Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
|
This PR is superseded: #680 (33bc57d on main) took it over, keeping its commits and authorship, and merged on October 25. On main, series subtitle picks are saved with Closing it closes no issues. Silo-Server/silo-server#1157 stays open for the other clients. Thank you for the work, @Rhainland. Posted by Claude Code (claude-opus-5-5) for a maintainer. |
Problem
Related issue: Silo-Server/silo-server#1157
Validation tasks: unblocks #323 C3, #324 C3 and C5
Stacked on #572 (and #571); review the top three commits. Merge those first.
On Android, a subtitle track or Off picked during playback applies only to that one file on that one device. Picks are stored in the local database by file and never sent to the server, so the next episode, a relaunch, or another device starts from the profile's defaults again. Web and the Apple apps save the pick for the whole series. The 1.0 criteria require a manual track choice or on/off override to apply to the entire series and persist (Silo-Server/silo-server#1157 AC3).
Approach
PUT /api/v2/subtitle-prefs/{series_id}(the movie's content ID for a movie). Off saves modeoff; Auto sendsDELETE.show_forced_subtitlesis never sent, so the profile's setting stays in charge. Writes go through an app-wide queue that keeps the latest choice per profile and series and retries network and server errors.mainalready fails on after a cold resume.Validation
ReflowStyleTest, which this change does not touch and which formats with the machine's locale. Phone and TV debug builds succeed.Evidence
Evidence: https://evidence.siloserver.org/r/silo-android/pr-573/
Surface and build: Android TV and phone emulators; this branch. Before, on
main, a pick on Android never reached the server (the series choice was unchanged afterwards).Risks
A subtitle pick on Android now changes the series for the profile on every device, as the web and Apple apps already do. The retry queue lives in memory and is lost if the app process dies before a write succeeds.
Checklist
AI Disclosure
Note
Add series-level subtitle choice persistence across mobile, TV, and shared playback
PUT/DELETE /api/v2/subtitle-prefs/{series_id}endpoints in SettingsV2Api.kt, and restored on the next episode or session through a newSeriesSubtitleChoiceWriterin SeriesSubtitleChoiceWriter.ktSubtitleTrackSignaturein SeriesSubtitleChoice.kt and shared auto-selection updates in AutoSubtitleResolver.ktSubtitleSyncMsbecomes profile-capable at settings manifest revision 18; edits with the toggle off save to the profile and can clear a stale device rowServerSettingsFlusherqueue is reworked to track device vs profile intents, hold revision-gated profile writes, and avoid a pending profile write overwriting a newer device writeMacroscope summarized d9e3f03.