fix: playback and reporting for merged/multi-version media#953
Open
schembriaiden wants to merge 1 commit intoDonutWare:developfrom
Open
fix: playback and reporting for merged/multi-version media#953schembriaiden wants to merge 1 commit intoDonutWare:developfrom
schembriaiden wants to merge 1 commit intoDonutWare:developfrom
Conversation
aab2c2d to
1c9c1e3
Compare
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.
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:
InformationModel.fromResponseto select the correct media source and associated streams based on an optionalselectedMediaSourceId, ensuring displayed metadata matches the selected version.InformationNotifierto pass the currently selected stream's media source ID when fetching item information, so the correct version's metadata is shown.Playback Model Enhancements:
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:
PlaybackModelHelper, ensured the correctmediaSourceis 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:
mediaStreamswhere necessary to keep models in sync with the selected stream.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
Checklist