Repository navigation
Fix opening a movie DVR recording's details page - #1969
Open
mackandall wants to merge 1 commit into
Open
mackandall wants to merge 1 commit into
mackandall wants to merge 1 commit into
Conversation
BaseItem.destination() switched on `type`, but a DVR recording's type is always RECORDING regardless of whether the underlying content is a movie or a series episode. Movie recordings fell into the else branch, producing a MediaItem destination with type=RECORDING, which DestinationContent has no page for -- so selecting a recording in Recorded Movies showed "Unsupported item type: Recording" instead of the movie's details page. Fix: add a RECORDING branch that redirects the same way the existing EPISODE branch already does -- to SeriesOverview when the recording has a seasonId (a recorded episode), otherwise to MediaItem with type=MOVIE. Verified live against an actively-recording movie (The Lord of the Rings: The Return of the King): the details page now renders (with the "Recording" indicator) and Play works.
Owner
|
Thanks for submitting this PR. Please fix the PR description to match the template provided when opening a pull request. Additionally, please review the AI/LLM policy again. |
This branch has not been deployed
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.
What
Selecting a DVR recording of a movie (e.g. from the Recorded Movies grid) shows a bare "Unsupported item type: Recording" screen instead of the movie's details page. No crash, just a dead-end text screen.
This equally affects an episode recording opened via its own standalone details destination — it just doesn't surface as often, since browsing an episode inline within its season page uses a different code path that renders its own header directly.
Root cause
BaseItem.destination()converts aBaseIteminto a navigationDestinationviawhen (type) { ... }. A DVR recording's owntypeis alwaysBaseItemKind.RECORDING, regardless of whether the underlying content is a movie or a series episode — there was noRECORDINGcase, so it fell intoelse -> Destination.MediaItem(this), which carriestype = RECORDINGstraight through.DestinationContent.kt's own dispatchwhen (destination.type)has cases forSERIES,MOVIE,EPISODE, etc., but none forRECORDINGeither — hence the "Unsupported item type" fallback branch and its literal message.Fix
Added a
BaseItemKind.RECORDING ->branch indestination(), mirroring the existingEPISODEbranch's logic: checkdata.seasonId— if present (a recorded episode), redirect toDestination.SeriesOverview(...)with the right season/episode ids; otherwise (a recorded movie), redirect toDestination.MediaItem(itemId = id, type = BaseItemKind.MOVIE, ...).This is safe because
MovieDetails/MovieViewModelonly usedestination.itemIdto re-fetch the item fresh from the server — thetypefield is purely used for the top-level page-dispatchwhen, not by the destination page itself.Verified on-device against an actively-recording movie: the details page now renders correctly (with a "Recording" indicator from a separate change), and pressing Play starts playback normally.