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
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
… 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.
f48a488 to
fd095bf
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.
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)
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:
|
|
This PR is superseded: #680 (33bc57d on main) took it over, keeping its commits and authorship, and merged on October 25. On main, the phone's Auto goes through the shared 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 C2, #324 C2
Stacked on #571; review the top three commits. Merge #571 first.
The phone and TV apps choose different subtitles for the same file, and the TV app chooses the wrong one for files with more than one audio track (Silo-Server/silo-server#1157 AC2):
AutoSubtitleResolver.origin/mainbehaves the same in all three cases.Approach
AutoSubtitleResolver, so phone and TV agree. A parity test compares them across modes, audio languages and the forced setting.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-572/
Surface and build: Android TV and tablet emulators; this branch. Before, on
main, the dual-audio file started with full English subtitles on the TV.Risks
Viewers whose profile is set to Off now see forced subtitles for foreign-language lines when "Show forced subtitles" is on, as the setting describes and as the web already does.
Checklist
AI Disclosure
Note
Unify phone and TV automatic subtitle selection and align subtitle sync storage with the profile
bestAutoSubtitleOrdinal,PlayerSubtitleInfo.isBitmap, etc.) are removed.resolveAutoSubtitlenow picks a forced track matching the playing audio language even when subtitles are set to off, and language matching recognizes more ISO 639 forms in AutoSubtitleResolver.kt.Macroscope summarized 0b78709.