Skip to content

fix: playback and reporting for merged/multi-version media#953

Open
schembriaiden wants to merge 1 commit intoDonutWare:developfrom
schembriaiden:fix/merged-multi-version-media
Open

fix: playback and reporting for merged/multi-version media#953
schembriaiden wants to merge 1 commit intoDonutWare:developfrom
schembriaiden:fix/merged-multi-version-media

Conversation

@schembriaiden
Copy link
Copy Markdown
Contributor

@schembriaiden schembriaiden commented Apr 15, 2026

Pull Request Description

This pull request improves how media sources and streams are selected and referenced throughout the playback and information models. The main focus is to ensure the correct media source and stream are used, especially when multiple versions or streams are available for an item, which enhances playback accuracy and metadata display.

Key changes include:

Media Source and Stream Selection Improvements:

  • Updated InformationModel.fromResponse to select the correct media source and associated streams based on an optional selectedMediaSourceId, ensuring displayed metadata matches the selected version.
  • Modified the InformationNotifier to pass the currently selected stream's media source ID when fetching item information, so the correct version's metadata is shown.

Playback Model Enhancements:

  • Adjusted playback models (DirectPlaybackModel, TranscodePlaybackModel, TvPlaybackModel) to consistently use the selected stream's media source ID (mediaStreams?.currentVersionStream?.id) instead of defaulting to the item ID when making playback, progress, and stop API calls.

Playback Model Helper Logic:

  • In PlaybackModelHelper, ensured the correct mediaSource is selected using the requested stream's media source ID, and propagated the updated stream model throughout playback model instantiation, including for TV and transcoded playback.

General Codebase Improvements:

  • Added missing imports and passed mediaStreams where necessary to keep models in sync with the selected stream.
  • Removed an unnecessary comment and improved imports for better code clarity.

These changes collectively improve playback reliability and ensure that the user always interacts with the correct version and stream of a media item.

Issue Being Fixed

Resolves #689, Resolves #801

Screenshots / Recordings

Tested On

  • Android
  • Android TV
  • iOS
  • Linux
  • Windows
  • macOS
  • Web

Checklist

  • If a new package was added, did you ensure it works for all supported platforms? Is the package well maintained
  • Check that any changes are related to the issue at hand.

@schembriaiden schembriaiden force-pushed the fix/merged-multi-version-media branch from aab2c2d to 1c9c1e3 Compare April 15, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant