Skip to content

Auto-play next episode for external players#1266

Open
Laskco wants to merge 1 commit into
NuvioMedia:cmp-rewritefrom
Laskco:cmp-rewrite
Open

Auto-play next episode for external players#1266
Laskco wants to merge 1 commit into
NuvioMedia:cmp-rewritefrom
Laskco:cmp-rewrite

Conversation

@Laskco

@Laskco Laskco commented Jun 5, 2026

Copy link
Copy Markdown

Summary

Adds auto-play next episode support for external players. The internal player already advances to the next episode when one finishes, but external players (mpv, Vimu, MX Player, VLC, etc.) had no equivalent path, so auto-next was unavailable for anyone using one. Routes external playback through the same next-episode flow the internal player uses, gated by the existing "Auto-play next episode" setting (no new toggle).

PR type

  • Approved larger or directional change

Why

External playback (App.kt's rememberExternalPlayerLauncher result handler) only saved progress and stopped, it never resolved a next episode or re-entered the play flow, so binge/auto-next did not work with an external player. This brings external playback to parity with the internal player. Maintainer-requested as the mobile counterpart to the same feature approved for NuvioTV.

Issue or approval

Maintainer-requested mobile parity for the external auto-next feature approved for NuvioTV (NuvioMedia/NuvioTV#2190, implemented in NuvioMedia/NuvioTV#2198).

UI / behavior impact

  • No UI change
  • No behavior change
  • UI changed only to fix a documented glitch/bug
  • Behavior changed only to fix a documented bug/regression
  • UI change has explicit maintainer approval
  • Behavior change has explicit maintainer approval

Policy check

  • I have read and understood CONTRIBUTING.md.
  • This PR is small, focused, and limited to one problem.
  • This PR is not cosmetic-only.
  • Any UI change fixes a linked glitch/bug and includes visual proof, or this PR has no UI change.
  • Any behavior change fixes a linked bug/regression or has explicit approval, or this PR has no behavior change.
  • This PR does not bundle unrelated refactors, cleanups, formatting, or drive-by changes.
  • This PR does not add dependencies, architecture changes, migrations, or product-direction changes without explicit approval.
  • I listed the testing performed below.

Scope boundaries

  • Internal player behavior unchanged.
  • No new user-facing settings, reuses the existing "Auto-play next episode" setting and Auto Stream Selection mode.
  • Next-episode resolution reuses the existing MetaDetails.nextReleasedEpisodeAfter, no change to that logic.
  • iOS: persistence is a no-op (external playback there is fire-and-forget with no result), so behavior is unchanged on iOS.

Testing

  • Device: NVIDIA Shield TV (2019), Android 11. Plus 3 variations of an Android Mobile Emulator. Debug assembleFullDebug APK, sideloaded.
  • External player: an mpv fork.
  • Verified S1E1 -> E2 -> E3 auto-advance; no advance on a manual stop (end_by=user).
  • Completion detection via end_by=playback_completion and the 90% position fallback.
  • Verified the external player kills the app process on the Shield and the result is redelivered to the recreated process; the persisted snapshot is recovered and auto-next still fires.
  • Verified the "Loading next episode" loader covers the cold-start / source-resolution hand-off.

Screenshots / Video (UI changes only)

The only UI is a full-screen "Loading next episode" loader shown during the hand-off. Screen recording to be attached.

Breaking changes

None.

Linked issues

NuvioMedia/NuvioTV#2190 (approved feature).

Mobile had no auto-next path for external players (only the internal player
advanced episodes). This wires the same next-episode flow for external playback.

- Detect completion from the external player result (end_by, with a 90% position
  fallback for players that don't report a reason)
- Resolve the next episode via MetaDetails.nextReleasedEpisodeAfter and route it
  through the normal episode-play path, reusing the existing stream auto-play ->
  external relaunch flow, gated by the existing "Auto-play next episode" setting
- Persist the launch snapshot to disk so auto-next survives the external player
  killing the app process (observed on NVIDIA Shield); recover it when the result
  is redelivered to the recreated process
- Show a "Loading next episode" loader covering the cold-start / source-resolution
  hand-off
@Laskco

Laskco commented Jun 5, 2026

Copy link
Copy Markdown
Author
8mb.video-xT0-yCsOkMrh.mp4

Video showing that auto-next is working with external players. (Sorry about the quality github only allows 10mb uploads)

@skoruppa Added external player auto-next to the mobile version.

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.

1 participant