Repository navigation
fix(tv): list each embedded subtitle track once in the player menu - #1013
Conversation
The TV Subtitles menu listed an embedded track twice when the server
delivers its row as a sidecar: once as the server row ("English (SDH) ·
SRT · Default") and again as the text track Media3 finds in the file.
Such a row resolves only to its own sidecar artifact, so nothing tied the
file's track to it and it was added as a player-only choice.
Subtitle rows on an original_http plan now keep the inventory's
container track ID as sourceContainerTrackId, whether or not the track
is natively switchable. The menu treats a Media3 track whose Format.id
names that ID as the row itself, so it keeps the server's label and is
not listed again, and a choice saved as that player track checks the
row. Server-made streams leave the field unset, since the file's IDs
name nothing in them. An unplayable row keeps its track listed apart,
as the only way to show it.
Related: Silo-Server#744
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
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:
|
Resolve the TvSubtitleHudState conflict with Silo-Server#1010: the row's plays() check now builds on playsAs, so a burned-in sidecar pick and a saved player-track choice both check their server row. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The Android TV subtitle-menu change is visible, but the linked captures are not a before-and-after of the same screen with the same media; the description explains that the duplicate could not be reproduced on current Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
…er track A burn-in-only row (VobSub or DVB on direct play) whose track the player cannot switch to natively plays only through a transcode, while Media3 already lists that track and can show it on the device. The menu hid that track behind the row, so the only route left was the transcode. Only a sidecar row now stands for the file's track. A saved choice of the hidden player track checks the row that stands for it. Picking that row sent the row's sidecar identity, so the adapter staged a replan and an extraction for the track already on screen. Picking it now re-picks the player track, and a pending player track marks its row as applying. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Quick104
left a comment
There was a problem hiding this comment.
🤖 Claude Code (claude-opus-5-5)
Review of 3fcdc21, which is this branch with main merged in. Main's #1010 changed the same check and focus lines in TvSubtitleHudState.kt to playsAs, so the merge resolves that conflict and plays() now builds on playsAs.
Two findings are below. I'm fixing both in a commit on this branch, so there's no need to change anything yourself. The approach holds up otherwise: the new field is needed, nativeSwitchTrackId behaves as before, and the phone menu lists only server rows, so it needs no change.
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:
|
|
🤖 Claude Code (claude-opus-5-5) Review summaryFit: 9/10 · Readiness: 8/10 — conditional (assuming CI is green) Reviewed head: 52532f6. That is the contributor's 53f5bb1, a merge of What changed during review
Both fixes have a test that failed on 3fcdc21 and passes on 52532f6. Left for the maintainers
Validated featuresValidation tasks: changes #324 C3. Case C3 (a manual track choice persists) hasn't been run yet, so no passed case regresses. I couldn't read the validation board, so I worked from #324's case table. TestsThe PR's new tests read the new field, so they don't build on the base and can't show that they detect the bug. The two cases added in review failed on 3fcdc21 before their fixes. On the reviewed code, the Android TV subtitle unit tests (261), the android-shared playback tests, the shared unit tests (2,517), and Other checks
Scores
|
|
The latest commit also changes the Android TV Subtitles menu: burn-in-only tracks remain separately selectable, and selecting a server row that represents the currently playing Media3 track keeps that track instead of starting a sidecar replan. The Evidence section says its captures are not a same-file pair, so they do not show these states against the same data.
The stated phone, tablet, and foldable exclusion is consistent with the TV-only menu consumer. Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
Problem
Related issue: #744
Validation tasks: changes #324 C3
Paired pull requests (same report): Silo-Server/silo-server#4639, Silo-Server/silo-server#4640, Silo-Server/silo-server#4641, Silo-Server/silo-server#4642, #1010, #1011, #1012, Silo-Server/silo-apple#1237, Silo-Server/AetherEngine#30
Other clients: Apple N/A (the duplicate comes from the Android TV menu listing Media3's own tracks beside the server rows); Roku N/A (same reason); Web N/A (same reason)
On Android TV, the in-player Subtitles menu listed an embedded text track twice when the server delivers its row as a sidecar: once as the server row ("English (SDH) · SRT · Default") and again as the track Media3 finds in the file ("Subtitle 2", or the player's own label). A direct-play MKV with two embedded tracks showed up to four rows (#744).
#744's exact file (two embedded SubRip tracks) no longer shows the duplicate on today's
mainagainst a current server, because those rows are now natively switchable, so this pull request links the issue instead of closing it. The duplicate remains for any embedded row the server delivers as a sidecar without making it natively switchable, such as an ASS track on direct play.Approach
The menu adds every Media3 track that no server row maps to. A row that the player cannot switch to natively resolves only to its own sidecar, so nothing tied the file's track to it. Subtitle rows on an
original_httpplan now keep the inventory's container track ID assourceContainerTrackId, whether or not the track is natively switchable. The TV menu treats a Media3 track whoseFormat.idnames that ID as the row itself, so the track is listed once, under the server's label, and a choice saved earlier as that player track checks the row. Server-made streams leave the field unset, since the file's IDs name nothing in them. Only a sidecar row stands for the file's track: an unplayable row, and aburn_in_onlyrow (VobSub or DVB on direct play) whose route is a transcode, keep their track listed separately as the way to show it on the device. Picking the checked row while a saved player-track choice plays keeps that track instead of replanning it.nativeSwitchTrackIdnow builds on the same helper.A server or library scan that sends no unique container track ID still lists the duplicate; nothing else ties the track to the row.
Validation
./scripts/test-check-build-supply-chain.shand./scripts/check-build-supply-chain.sh: pass../gradlew testDebugUnitTest: pass, including a table test of the TV menu options (sidecar rows, merged sources, unnamed tracks, missing IDs, unplayable rows, and the checked row for a saved player-track choice).mainthat resolves the conflict with fix(player): play an ASS pick that the server burns in on an HLS transcode #1010): the menu test's newburn_in_onlycase and its re-pick check each failed on 3fcdc21 and pass now; all 261 Android TV unit tests, the android-shared and shared unit tests, and:androidTvApp:lintDebugpass.:android-shared:lintDebug :androidApp:lintDebug :androidTvApp:lintDebug :androidApp:lintVitalRelease :androidTvApp:lintVitalRelease: pass.:androidApp:assembleDebug :androidTvApp:assembleDebug: pass.main, a direct-play synthetic MKV with an ASS track the server delivers as a sidecar ("H264 MoreFonts (2018)") listed the extra "Subtitle 2" row; this branch lists the issue's synthetic "Dual SRT (2020)" file once per track. On today'smainagainst a current server I could not reproduce the duplicate for either file (Dual SRT's rows are now natively switchable, and MoreFonts plays through a transcode on this emulator), so the captures are not a same-file pair.Evidence
Evidence: https://evidence.siloserver.org/r/silo-android/pr-1013/
Surface and build: Android TV emulator (Android 14, 1080p), debug builds of
main(Nov 19 and today) and this branch. The captures are not a same-file pair; the page says why. The phone, tablet and foldable are unaffected: the change is in the TV menu builder, and the new field is only read there.Risks
None identified. Older servers that send no container track ID keep today's listing.
Checklist
AI Disclosure
Note
Fix duplicate embedded subtitle tracks in TV player menu
sourceContainerTrackIdtoPlayerSubtitleInfoand aPlaybackPlanV3.sourceContainerTrackIdresolver, which returns the container track ID only for embedded rows on anORIGINAL_HTTPplan with a unique canonical ID (PlaybackModels.kt, PlaybackProtocolV3.kt).PlaybackPlanV3.nativeSwitchTrackIdis refactored to route through the newsourceContainerTrackIdhelper in PlaybackProtocolV3.kt; review that native-switch resolution still excludes burn-in mode as before.Macroscope summarized 52532f6.