Skip to content

Detail: the facts row and the badge describe the version Play starts - #1379

Merged
GLinnik21 merged 3 commits into
plxnative:mainfrom
PilaScat:fix/detail-describes-played-version
Nov 16, 2026
Merged

GLinnik21 merged 3 commits into
plxnative:mainfrom
PilaScat:fix/detail-describes-played-version

Conversation

@PilaScat

Copy link
Copy Markdown
Contributor

Closes #1327

Since #1245, Play starts a later version when the set can't decode the first one, but the detail page still described Media[0]. On a 1080p panel, a film with a 4K HEVC version first and a 1080p HEVC copy second read "4K · Server conversion" while Resume played the 1080p copy directly.

As agreed on #1327:

  • route::version_play_starts is the one rule for which version a play starts: decodable_version, or Media[0] under Forced. Play reaches it through automatic_version, the page through detail_play_version. On a show page the versions are the on-deck episode's, the episode the facts row already answers for.
  • Option (b): Detail::version_parts keeps each version's first Part key and its audio and subtitle tracks. parse_streams fills it from the same response as the rest of the technical fields, so a show page takes it from its on-deck episode. The preview plans from that version's part, codec, frame size, bitrate and tracks. If the page doesn't hold that part, the play-mode clause is left out.
  • The badge shows only the version Play starts. The HDR flag behind the tone-mapping warning reads the same version.
  • No manual-pick handling.

Three commits:

  • 618d4bc: the data. Test each_version_keeps_its_own_part_and_tracks.
  • 7dda596: the helper and the preview. Test the_preview_describes_the_version_play_starts, with a VP9 4K first version (not decodable on Caps::assumed) and an H.264 1080p second one. Before the fix the preview was Converts for the film and for the show's on-deck episode; now it is DirectPlay, OriginalAudioConverted when the second version's only audio is TrueHD, and None when its part is missing. Under Forced it stays on the first version.
  • 4678b8f: the badge and the HDR flag. Tests the_resolution_badge_names_the_version_play_starts (before: "4K" and no "1080p") and the_hdr_warning_follows_the_version_play_starts (before: the 1080p SDR copy counted as HDR).

Two choices to check:

  • Subtitles. I kept each version's subtitle tracks too. The preview's audio check reads pick_dp_subtitle, so with Media[0]'s list it could answer for the wrong file.
  • Dolby Vision. A substituted version is previewed as not DV, which is how decodable_version already treats every version. Carrying each version's DV is follow-up 3 on Default to a version the set can decode #1245.

Detail is a recorded value (metadata::record), so the new field is serde(default, skip_serializing_if = "Vec::is_empty") and older recordings still round-trip.

Checks

On 4678b8f, WSL2 x86_64:

  • make check-cargo: 43 suites, 27387 passed, 0 failed, 232 ignored.
  • make check-python: all 136 steps ok.
  • Two full make check runs each stopped on one timing-sensitive step outside this diff, a different one each time: test_harness.py test_a_scoped_rate_leaves_other_connections_alone (0.136 s against 0.064 s), then tools/tv-lock.sh selftest ("with (inherited) on an idle set", rc=6). Rerun alone, they passed 3/3 and 2/2. The branch touches no file under tests/, tools/ or ci/.
  • make check-nodef: clean.
  • cargo check --lib --target armv7-unknown-linux-gnueabi -p plx_data -p plx_media -p plx_screens: clean.
  • pr-reviewer: no blocker. Its major point, the show page still reading the on-deck episode's Media[0], is fixed in 618d4bc and 7dda596, with the show case in the preview test. Its minor test point (no Forced case) is covered in the same test. doc-claim-auditor: no findings.

Not covered

  • No television run: the page isn't in a nightly yet.
  • A show page with no on-deck episode has no play-mode clause, as before, and its badge still reads the first episode's Media[0]: the preview answers only for the on-deck episode.

🤖 Generated with Claude Code

PilaScat and others added 3 commits November 13, 2026 23:03
The facts row plans from Media[0]'s part and tracks. For an item with
several versions, Detail now also keeps every version's first part key
and its audio and subtitle tracks, from the same response, so the
preview can run the same track checks on the version Play starts.

Refs plxnative#1327

Signed-off-by: Filippo Scatigna <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
playback_preview planned from Media[0]. When Play replaces a first
version the set cannot decode, the facts row still described that first
version: a 4K film whose 1080p copy plays directly read "Server
conversion".

version_play_starts is now the one rule for which version a play starts
(decodable_version, or Media[0] under Forced), used by Play through
automatic_version and by the page through detail_play_version. The
preview plans from that version's part, codec, frame size, bitrate and
tracks. When the page does not hold that version's part it leaves the
clause out.

Test: the_preview_describes_the_version_play_starts. Before the fix
the first assertion got Some(Converts) instead of Some(DirectPlay).

Refs plxnative#1327

Signed-off-by: Filippo Scatigna <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…y starts

The hero's resolution badge and the HDR flag behind the play-mode
warning read Media[0]. They now read the version detail_play_version
returns, the same one the preview plans from, and fall back to the item
when Play starts Media[0].

Tests:
- the_resolution_badge_names_the_version_play_starts: before, the row
  painted "4K" and no "1080p".
- the_hdr_warning_follows_the_version_play_starts: with the old reading
  the 1080p SDR copy counted as HDR.

Refs plxnative#1327

Signed-off-by: Filippo Scatigna <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings November 14, 2026 00:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@GLinnik21 GLinnik21 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@GLinnik21
GLinnik21 merged commit aa0407f into plxnative:main Nov 16, 2026
13 checks passed
@PilaScat
PilaScat deleted the fix/detail-describes-played-version branch November 16, 2026 23:47
nphil added a commit to nphil/Marquee that referenced this pull request Nov 18, 2026
The resolution badge, facts row and HDR warning read the first version
listed even when Play starts another one. They now read the file Play
starts, with its own Dolby Vision, bitrate and audio. On a show page that
is the episode Play starts (the one being resumed, else the first one
shown), whose streams and versions come from its own full item; a card
launch picks the same episode.

Ported from upstream aa0407f (Detail: the facts row and the badge describe the version Play starts (plxnative#1379)).
Ported from upstream a056817 (Version choice: judge each version's Dolby Vision as the direct-play gate does (plxnative#1421)).
Ported from upstream 3878e4f (Quality ceiling: judge every version on its video bitrate, as Media[0] is (plxnative#1423)).
Ported from upstream 247aa86 (Share the video facts of the file Play starts (plxnative#1457)).
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.

Detail page: the facts row describes Media[0] while Play starts another version

3 participants