Repository navigation
Conversation
The Audio Language picker wrote `playback.audio_language` as a device-scoped setting that nothing read — not this repo, not the server. The server resolves the initial audio track from the profile's `language` field (silo-server `internal/catalog/detail.go` emits it as `effective_audio_track_index`, which `PlaybackSessionBridge` forwards at session start), and `WireFormatModels.asUserProfile` was deliberately dropping that field on the way into `UserProfile`. Carry `language` through into `UserProfile`, let `UpdateProfileBody` write it, and point the iOS/macOS and tvOS pickers at the profile value through a new `saveAudioLanguage()` on both settings view models. Both pickers now build from the shared `PlaybackLanguageOption.all` list the subtitle and metadata pickers already use, so a language set from the web client (zh/ru/ar/hi) renders instead of showing a blank row, and the two hardcoded nine-entry copies are gone. The choice is profile-wide rather than per-device, so the Streaming footer now says so and the dead device-scoped `PlayerSettings` audio-language state is removed. `PlayerDeviceSettingKey.audioLanguage` stays so "Reset Playback Overrides" still deletes rows written by older builds. Refs Silo-Server/silo-server#376 AI-use disclosure: implemented with Claude Code. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This was referenced Jul 25, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The Audio Language picker writes a value that nothing ever reads. Verified P1 from Silo-Server/silo-server#376.
PlayerSettingswroteplayback.audio_languageas a device setting, but repository-wide that value was only ever loaded, cached, displayed, and written back inside the settings layer — no detail, session-start, route-planning, or player-selection path consumed it. The server picks the initial audio track from the profile'slanguagefield instead, andWireFormatModels.asUserProfilewas deliberately dropping that field, whileUpdateProfileBodyhad no way to write it.Net effect: changing a visible setting did nothing.
Fix
Point the setting at what the server actually reads.
Profile.languagenow flows throughasUserProfileintoUserProfile.language, andUpdateProfileBodygainedlanguageso the client can write it.preferredAudioLanguagewith a profile editor field plussaveAudioLanguage(), which PUTs to/api/v1/profiles/{id}, refreshes the localactiveProfilesnapshot, and flushes the itemResponseCache(and tvOSItemDetailCache) so an already-visited detail screen stops showing the stale track.PlaybackLanguageOption.alllist the subtitle and metadata pickers already use, deleting two duplicated 9-entry lists. This is required, not cosmetic: a language set from the web client (zh/ru/ar/hi) would otherwise render as a blank row.audioLanguagestate is removed fromPlayerSettings.PlayerDeviceSettingKey.audioLanguageis kept so "Reset Playback Overrides" still clears rows written by older builds — leaving a dead write path would have undercut the point of the fix.No server change is needed:
PUT /profiles/{id}already acceptslanguagefor self-service, stores it, and returns it. silo-android already readsactiveProfile?.language.Verification
Built on mac-builder in an isolated worktree — all three schemes, zero errors:
SiloSiloTVSiloMacAll remaining warnings are pre-existing and in untouched files (
SubtitleSession,Pairing/*,PendingReportStore,TVAudiobookDetailView,DownloadsManagerComponents).The repo's only two executable scripts (
resolve-marketing-version.test.sh,resolve-platform.test.sh) also pass. There is no Swift unit-test target to run.Known limits and follow-ups
playback.audio_languagerows inuser_device_settingsfrom earlier builds are now orphaned. Harmless today, but the settings contract (feat(settings): add the canonical contract manifest and validator silo-server#473) resolves that keyprofile_device → profile, so a stale row would shadow the new profile value — and it would be a value the user set months ago and saw no effect from. Needs an explicit migration disposition server-side; deliberately not papered over with a client-side DELETE.originalsentinel, versus the full ISO 639-1 list the web writes. Pre-existing gap shared with the subtitle and metadata pickers; this change improves it (9 → 12) without closing it. An unmatched selection displays blank, it does not overwrite the stored value.activeProfile = UserProfile(...)reconstructions dropisPrimary, silently resetting it tofalseafter any profile save. Second concern, and anything keying offisPrimarywould change behavior. Worth its own issue.Part of Silo-Server/silo-server#376.
AI-use disclosure
Implemented with AI assistance (Claude Opus 5) under maintainer direction. Builds were run and confirmed independently on mac-builder rather than reported from the implementing agent, which had no Swift toolchain available.