fix(phone): block stale pause progress writes during content reload - #241
Draft
cursor[bot] wants to merge 2 commits into
Draft
fix(phone): block stale pause progress writes during content reload#241cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
onPositionChanged already ignores samples while a load transition has positionReportsBlockedForPendingLoad set, but onPlayingChanged still forced maybeRecordPosition on every isPlaying=false edge. After publishLoadingState retargets contentId (auto-advance, On Deck, version switch) the old Media3 item can still pause, writing the previous episode's position under the next item's id/fileId. Co-authored-by: Quick <Quick104@users.noreply.github.com>
Compose throws IllegalArgumentException when a LazyRow/Grid reuses a key. TV already deduplicated contentId in #188 after a production crash (Key "series-tvdb-280619" was already used); phone home rows, browse, search, collections, and More Like This still keyed on contentId with no guard. Deduplicate by identity before keying (first occurrence wins) and stall paginated load-more when a page adds only duplicates so hasMore cannot spin. Home/library/TV skyline section lists also unique-by-id so a repeated section cannot take the app down. Co-authored-by: Quick <Quick104@users.noreply.github.com>
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.
Summary
Fixes a watch-progress corruption bug on the phone player during in-place content reloads (auto-advance, On Deck, version switch, subtitle recovery restart).
onPositionChangedalready ignores samples whilepositionReportsBlockedForPendingLoadis set at the start ofloadContent, butonPlayingChangedstill calledmaybeRecordPosition(force=true)on everyisPlaying=falseedge without that guard.After
publishLoadingStateretargetscontentIdto the next item, the previous Media3 item can still pause/stop and persist the old episode's position under the new item's(contentId, fileId)key.Fix
Apply the same load-transition guard used by
onPositionChangedbefore forcing a Track B progress write fromonPlayingChanged.Test plan