Skip to content

fix(player): prefer same stream name from active provider on next episode - #622

Open
Abhinav2k wants to merge 1 commit into
NuvioMedia:Devfrom
Abhinav2k:fix/next-episode-matching-stream
Open

Abhinav2k wants to merge 1 commit into
NuvioMedia:Devfrom
Abhinav2k:fix/next-episode-matching-stream

Conversation

@Abhinav2k

@Abhinav2k Abhinav2k commented Sep 5, 2026

Copy link
Copy Markdown

Summary

Enhances next-episode stream auto-selection by preferring candidates that share the active stream name and provider when bingeGroup is missing, falling back to the standard auto-play scanning algorithm if no matching candidate is found.

PR type

  • Reproducible bug fix
  • UI glitch/bug fix
  • Behavior bug/regression fix
  • Small maintenance only, with no UI or behavior change
  • Docs accuracy fix
  • Translation/localization only
  • Approved larger or directional change

Why

When watching a series episode from an addon or provider that does not set behaviorHints.bingeGroup (e.g. scrapers or multi-source addons), advancing to the next episode failed:

  1. In manual mode, next-episode auto-play aborted because bingeGroup was absent.
  2. In auto-play mode, the selector fell back to picking the first stream across all addons, often picking an incompatible or non-functional stream from a completely different provider.

This change ensures the player remembers the active stream's title, subtitle, and provider ID/name and prioritizes matching streams from the same provider for seamless episodic playback.

Desktop scope

Affects desktop player playback and stream selection logic across Windows, macOS, and Linux (implemented in common desktop shared code).

Issue or approval

Fixes #659

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 scoped to the desktop app, desktop packaging, desktop documentation, or shared code required for desktop behavior.
  • 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

Intentionally avoids changing regular movie or initial stream selection, and does not alter bingeGroup evaluation order when bingeGroup is present. Only supplies fallback stream-matching preferences to next-episode transitions. No UI components were modified.

Testing

  • Tested on Windows 11 (built from source via Gradle).
  • Executed unit tests: ./gradlew :composeApp:desktopTest --tests "com.nuvio.app.features.streams.StreamAutoPlaySelectorTest" (all 18 test cases passed, including 4 new test cases covering same-name stream prioritization, subtitle discrimination, fallback to standard algorithm, and manual mode handling).
  • Manually tested in the desktop app by playing multi-episode series content and confirming that clicking "Next episode" seamlessly selects the matching stream from the active provider.

Screenshots / Video

Not a UI change

Breaking changes

None

Linked issues

Fixes #659

@Abhinav2k
Abhinav2k force-pushed the fix/next-episode-matching-stream branch from 2720261 to 712eee0 Compare September 11, 2026 13:30
@KhooLy

KhooLy commented Sep 11, 2026

Copy link
Copy Markdown
Member

this doesnt look like desktop specific please move this to NuvioMobile.

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.

[Bug]: Next episode fails to play or selects wrong provider stream when bingeGroup is missing

2 participants