Skip to content

Play Version: pick which version of a movie or episode plays - #955

Merged
GLinnik21 merged 10 commits into
plxnative:mainfrom
aulonm:feat/play-version-picker
Oct 24, 2026
Merged

GLinnik21 merged 10 commits into
plxnative:mainfrom
aulonm:feat/play-version-picker

Conversation

@aulonm

@aulonm aulonm commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

tbh not sure if you would like the functionality, but it's something that I use very often and I was missing it, so thought why not add it and make it easier for everyone. Hopefully we can work together to get this out! The diff is really huge because the fixture recordings needed to be rerecorded

Items with several Media[] versions always played version 0, since mediaIndex was hard-coded to 0 (the version-picker gap in docs/parity-gaps.md). This adds two ways to pick one, both opening the same list of versions, e.g. "25.2 Mbps · 4K" with a sub-line that only names what actually differs (codec/HDR, audio, container, size).

  • hold menu: a "Play Version…" row on movies and episodes with two or more versions. It turns the menu into the version list
  • detail page: a Play Version disc, last in the action row, that unfurls on focus like Restart/Trailer and opens the list as a panel anchored to it (the Also available shape). On a show page it offers the versions of the episode the hero's Play plays

Playback:

  • a version is picked by its Media.id (MediaId) and resolved to mediaIndex on the resolve worker, so a refetch that reorders Media[] can't play the wrong one
  • Metadata::media_version(Option<MediaId>) replaces first_part() / primary_media(), so no play-path reader can silently take Media[0]
  • the chosen version's part, codecs, track store, MDE ask, transcode decision and start URL all come from that version. cur_media_index keeps it for seeks, HLS rungs, quality changes and Original recovery
  • a pick resumes like Play. Retry and quality change keep the version, next-episode autoplay goes back to the default, and a version that disappeared falls back to the default with a log line
  • versions come from the listing rows and detail we already fetch, no extra request

Plumbing:

  • one list builder for both callers (appkit::version_list). The panel's placement moved from alt_sources into ui::popover so both panels share it without a sibling-screen reference
  • the hero layout takes a fourth unfurling disc (hero_layout::DISCS), with geometry tests that four discs never cross the people column in any shipped language
  • screen-shape pin bumped and the three replay anchors re-recorded (verdict SAME). mock_pms.py --multi-version gives the simulator a two-version movie and episode

Verified: host tests green for every touched crate, and make check-nodef clean. In the simulator, picking the 4K version sent mediaIndex=1 on the MDE, decision and HLS asks and PUT the stream selection on the 4K part, while the Play pill still sends mediaIndex=0. One make check run had ci/test_build_gc.py hang on a leftover sleep from its own fake hung run. It passes alone and this PR doesn't touch it.

Not verified yet

  • Haven't tested it on a real TV, but did run the simulator and that works as intended

🤖 Generated with Claude Code

The item menu gets a Play Version… row when a leaf has two or more versions. It turns the
panel into the list of versions, and a row plays that version by its Media.id. The id is
resolved to mediaIndex on the resolve worker, and the part, codecs, track store, MDE ask,
transcode decision and start URL all come from that version. Retry and quality changes keep it;
next-episode autoplay does not.
… mock a two-version item

item_menu::SHAPE gained the two version actions, so the shape pin moves and the three anchors
were re-recorded (shorter cadence, the 120 Hz display overran the replay budget). The mock's
--multi-version gives the first movie and episode a 4K second version for the simulator.
A leaf with two or more versions gets a Play Version disc after Play and the bookmark. It
unfurls like Restart and opens the version list as a panel anchored to it; a row plays that
version the way Play does, resuming. The list is one builder in appkit (version_list), drawn by
the item menu's page and the panel, and the anchored placement moved to plx_ui::popover so the
panel does not name alt_sources. The disc budget takes a fourth disc.
AppArg gains VersionsPanel and versions_panel::SHAPE joins the census, so the shape moved and the three anchors were refused. Re-recorded at the short cadence; settings needed a shorter settle to fit the record budget.
The disc moves after the watched toggle. A show page's hero plays an episode, so it now offers
that episode's versions (the on-deck one, else the first) and a pick plays that episode in that
version.
The version list's fit test, the disc's order/verb/anchor checks, the default-row and row-id
panel checks and the appkit-level four-disc test are each covered by a test that remains.
@aulonm
aulonm marked this pull request as ready for review October 23, 2026 20:17
aulonm and others added 3 commits October 24, 2026 11:11
# Conflicts:
#	rust-modules/screens/src/registry.rs
#	tests/fixtures/replay/1-boot-home-chip-grid/manifest.json
#	tests/fixtures/replay/1-boot-home-chip-grid/rec-0000.jsonl
#	tests/fixtures/replay/12-filmography-detail-return/manifest.json
#	tests/fixtures/replay/12-filmography-detail-return/rec-0000.jsonl
#	tests/fixtures/replay/6-settings-family/manifest.json
#	tests/fixtures/replay/6-settings-family/rec-0000.jsonl
#	tests/fixtures/replay/README.md
@GLinnik21
GLinnik21 merged commit b937727 into plxnative:main Oct 24, 2026
19 of 22 checks passed
@fingers986

Copy link
Copy Markdown

Hello, how can you make it run at 120fps?

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.

3 participants