Fix continue watching advancing to the next episode before finishing the current one - #3210
Closed
mehdigm4life wants to merge 1 commit into
Closed
mehdigm4life wants to merge 1 commit into
mehdigm4life wants to merge 1 commit into
Conversation
github-actions
Bot
force-pushed
the
fix/resume-watching-final-minutes
branch
from
September 22, 2026 19:45
cead83d to
7935f77
Compare
Author
|
Closed to reopen a fresh PR with the same changes. (build check need approval) |
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.
Issue
When exiting the internal player during the last minutes of an episode — before it actually finished — the Continue Watching row would already show the next episode from the start, even though the current episode was never completed.
The reason: resume progress was saved on a milestone, and
setViewPosAndResumeimmediately switched the "continue watching" entry to the next episode once progress reached 90% of the current one.Fix
The next episode only becomes the resume target once the current episode has actually finished playing:
DataStoreHelper.setViewPosAndResumenow takes acompletedflag. Unless the video reached its end, the resume entry stays on the current episode (at the position where you left).GeneratorPlayer.nextEpisode()before advancing to the next episode, andonVideoEnded()callback for when autoplay is disabled and the player stays on the end screen.PlayerView.onVideoEnded()so host fragments are notified when playback reaches the end.Behavior after the fix
Verified by compiling with
:app:compileStableDebugKotlin. No settings or UI changes.