fix(tv): carry the audio the viewer actually chose, not the plan's - #177
Conversation
Integration damage from merging the audio-selection work onto the player work. Both defects have the same cause: a direct-play local switch changes the mounted audio track WITHOUT a server replan, so playbackPlan still names the previous track — and two paths read the plan as though it were the record of what the viewer chose. Auto-advance handed the next episode the wrong audio. advanceToNextEpisode labelled the carried track from playbackPlan.selectedTracks.audioIndex, so after a local switch the next episode started on the track the viewer had just switched away from, while manualAudioSelectionApplied said a choice had been made. Pick Japanese, let it roll on, get English. The confirmed desiredAudioOrdinal now takes precedence. Replans rebuilt the same stale choice. subtitlePlaybackContext derived its audio the same way, so any later subtitle, quality or output-route transaction replanned the viewer back onto the previous track. The recovery replan already preferred the confirmed choice; this brings the transaction path in line with it. Also repairs three KDocs the merge left attached to the wrong declaration: PlayerTrackEntry's doc had been stranded above an inserted helper, desiredAudioOrdinal had accumulated two, and a stale one described a backend counter that is not the property beneath it. Found by auditing merged main for integration damage rather than by reviewing either PR in isolation — neither was wrong on its own. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0115uaQ6FTQZK8KYvazjefaW
|
Warning Review limit reached
Next review available in: 18 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
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 |
Integration damage on
main, found by auditing the merged result rather than by reviewing either PR in isolation. Neither #170 nor #173 was wrong on its own — the defect only exists in the combination.The user-visible bug
Pick a non-default audio track, let the episode auto-advance, and the next episode starts on the track you switched away from.
A direct-play local switch changes the mounted audio track without a server replan, so
playbackPlanstill names the previous one.advanceToNextEpisodelabelled the carried track fromplaybackPlan.selectedTracks.audioIndex, so the handoff contradictedmanualAudioSelectionApplied, which correctly said a choice had been made.The confirmed
desiredAudioOrdinalnow takes precedence.The same mistake one layer down
subtitlePlaybackContextderived its audio the same way, so any later subtitle, quality or output-route transaction replanned the viewer straight back onto the previous track.The recovery replan already preferred the confirmed choice — this brings the transaction path in line with it, rather than inventing a third rule.
Merge tidy-up
Three KDocs ended up attached to the wrong declaration:
PlayerTrackEntry's doc was stranded above an inserted helper,desiredAudioOrdinalaccumulated two, and a stale one describes a backend counter that isn't the property beneath it.Testing
Full suite green on all four modules with
--rerun-tasks.Not device-verified. The auto-advance path is testable on hardware — pick a non-default track, seek to the end, watch what the next episode starts on — and that is worth doing before trusting this.
🤖 Generated with Claude Code
https://claude.ai/code/session_0115uaQ6FTQZK8KYvazjefaW