Skip to content

Fix continue watching advancing to the next episode before finishing the current one - #3211

Closed
mehdigm4life wants to merge 1 commit into
recloudstream:masterfrom
mehdigm4life:fix/resume-watching-final-minutes
Closed

mehdigm4life wants to merge 1 commit into
recloudstream:masterfrom
mehdigm4life:fix/resume-watching-final-minutes

Conversation

@mehdigm4life

Copy link
Copy Markdown

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 setViewPosAndResume immediately 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.setViewPosAndResume now takes a completed flag. Unless the video reached its end, the resume entry stays on the current episode (at the position where you left).
  • The completion is recorded where the video truly ends:
    • in GeneratorPlayer.nextEpisode() before advancing to the next episode, and
    • via a new onVideoEnded() callback for when autoplay is disabled and the player stays on the end screen.
  • Added PlayerView.onVideoEnded() so host fragments are notified when playback reaches the end.

Behavior after the fix

  • Leaving an episode at, e.g., 93% → Continue Watching keeps the same episode at 93%.
  • Only finishing/watching to the end moves Continue Watching to the next episode (or removes the show from the row if it was the last episode).

Verified by compiling with :app:compileStableDebugKotlin. No settings or UI changes.

@mehdigm4life

Copy link
Copy Markdown
Author

@fire-light42

@fire-light42

Copy link
Copy Markdown
Collaborator

It was intentionally designed to go to the next episode at 90% watch time. This is a counterintuitive quality of life feature which is designed to let users continue watching without having to watch the outro/credits of the previous episode.

@mehdigm4life

Copy link
Copy Markdown
Author

@fire-light42 and streamRuby extractor PR ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants