Repository navigation
fix(web): pick Auto subtitles by the subtitle language, as the apps do - #3008
Conversation
In Auto mode the web player turned subtitles off when the playing audio matched the profile's audio language. The Android and Apple apps, and Jellyfin's Smart mode, compare the playing audio with the profile's subtitle language instead, so the same profile and title showed different subtitles on the web. The web now uses that rule: audio in the subtitle language gets no full subtitles (forced only, per the setting); other audio gets the subtitle language's best track. The hard-coded English default, the audio preference standing in for a missing subtitle language, and the guess that unknown audio matches the profile are gone. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
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 9 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 |
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. |
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:
|
|
Please add phone-width web before-and-after captures of the detail-page Auto subtitle selection and the player's selected/rendered subtitles, using the same data and identifying each build. This changes subtitle selection on mobile too; sharing selection code and leaving layout unchanged does not make that surface unaffected. The desktop captures show the primary change. |
|
The PR changes the recorded Web Auto outcome: with English audio and a Spanish subtitle preference, the resolver now selects Spanish instead of showing no full subtitles. The 14 October human-verified comments report Web C2 and C4 as passing with #2451/#2452 (the task’s Results table still says Not run, and the comments record no build ID). This is a major change: the PR should explicitly connect its app-parity rationale to these validated results, and C2 and C4 need re-validation after merge. C4 also checks cross-client preference reads and rendered captions.
Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed. Posted via Macroscope — v1 validation impact |
Group text cues into top, middle, and bottom bands with their authored alignment and position, and port the fork's identity-based subtitle selection: an adopted plan resolves the committed asset, a manual pick survives a re-minted ordinal, a version switch carries the selection by identity, and a refused replan rolls back to the accepted row. Auto keeps Silo-Server#3008's subtitle-language rule for known audio and restores the fork's profile-language fallback only when the audio language is unknown. The series-choice write keeps show_forced_subtitles off the legacy row: the server copies that member into the canonical profile_series row, so echoing it would pin the setting.
Problem
Related issue: #1157
Validation tasks: unblocks #1159 C2
With subtitles on Auto, the web player shows different subtitles from the Android and Apple apps for the same profile and title. The web turns full subtitles off when the playing audio matches the profile's audio language. The apps compare the playing audio with the profile's subtitle language, which is also how Silo maps Auto to Jellyfin's Smart mode. A viewer with English audio preferred and Spanish subtitles preferred gets no subtitles on English audio in the web app, but Spanish subtitles in the apps. Web also falls back to English when no subtitle language is set and assumes untagged audio matches the profile.
This change makes the web follow the apps' rule.
Approach
resolveSubtitleAutoSelectnow compares the playing audio with the profile's subtitle language. Audio in that language gets no full subtitles, only the forced track when "Show forced subtitles" is on. Other audio gets that language's best track, and full dialogue still outranks forced tracks. With no subtitle language set, Auto shows no full subtitles. Untagged orundaudio never counts as matching. The audio preference no longer feeds the rule, so theprofileLanguageprop it needed is removed from the detail page and player.Two forced-track edge cases still differ from the apps and are left for a separate decision: with no subtitle language and forced subtitles on, the web shows the forced track in the audio's language (the apps show none); and when the subtitle language has no track at all, the web shows nothing (Android falls back to any forced track). jellycompat's Smart mapping also still differs in two places: it keeps a regional subtitle preference exact where the web compares base languages, and it treats an unset subtitle language as matching any track.
Validation
main: with profile audio English, subtitles Spanish and Auto, English audio showed subtitles off on the detail page and in the player. On this branch the detail page reads "Auto: Spanish" and the player renders Spanish.undaudio, regional tags, ISO 639-1 and 639-2 codes, forced on and off, and full dialogue over forced. Its new rows fail onmain.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/web-auto-subtitles/
Risks
Web viewers whose audio and subtitle preferences differ see different Auto subtitles than before, the same ones the apps already show.
Follow-ups: none. A separate PR saves audio picks for the series; it is independent of this rule.
User manual: Silo-Server/siloserver.org#207, draft docs PR Silo-Server/siloserver.org#248
Checklist
AI Disclosure
🤖 Generated with Claude Code
Note
Fix web Auto subtitle selection to use subtitle language, not profile language
resolveSubtitleAutoSelectin subtitleSort.ts now picks Auto subtitles from the subtitle language preference, matching app behavior. It no longer falls back to the profile's language for audio or subtitle matching, and treatsund(undetermined) as unknown audio.profile-languageprop from the whole watch-page chain:WatchPageProps,VideoPlayerProps,ActionBarProps,SubtitlesPopoverProps, and related helpers and tests.sameLanguageCodenow rejects empty or unknown normalized codes, and undetermined language values no longer count as concrete languages.Macroscope summarized 80a41a7.