Skip to content

Player: Previous always plays the previous episode, and a fresh play has one to go to - #1349

Merged
GLinnik21 merged 4 commits into
mainfrom
feat-previous-episode
Nov 12, 2026
Merged

GLinnik21 merged 4 commits into
mainfrom
feat-previous-episode

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

What

The player's Previous button now always plays the previous episode, and a fresh play has one to go to.

  • Previous is the queue step only. It used to become Restart five seconds into an episode: it sought the playing episode to 0 (rewriting its playhead and viewOffset), and under five seconds it was disabled again. The restart face and its five-second rule are gone. From beginning stays on the Info tab, in the More menu of HUD packages that fold it, and on the detail hero.
  • A fresh play gets the show's queue. Continue Watching, the detail page's Play/Resume, Up Next and autoplay used to POST uri=<episode>&continuous=1, which PMS answers with the episode and its successors only, so the queue had no row before the playing one. An episode whose show is known now asks for uri=<show>&key=<episode> (no continuous), accepts it only when the answer selects that episode, and otherwise falls back to the old request. When rows precede the selection but the window opens on it, the existing window read runs once.
  • Leaving an episode keeps its progress. Previous and Next never seek; the outgoing episode's stop report carries its real position, and the handoff's window re-read waits (bounded, 1500 ms, on the worker leg) for that report, so stepping back to an episode just left resumes it where it was.
  • HUD plugins: the restart face of the previous command still parses (published packages keep loading) and is no longer selected.
  • tests/mock_pms.py serves the show-keyed queue.

Skip and Up Next prompts are unchanged: while one occupies the row, Previous/Next are not on it (the owner asked for no redesign there).

Verification

  • Regression a_fresh_play_of_a_middle_episode_lands_the_episodes_before_it failed against the old request and passes; hostsim rig tests: Previous mid-episode plays the prior episode, seeks nowhere and the outgoing episode reports its real position; Previous on the first episode is disabled; Next.
  • Crate suites: plx_media 2015, plx_appkit 953, plx_screens 2137, plx_plex 801, plx_data 1540, application hostsim 1529, plx_media hostsim 2295 passed; make check-nodef, check-deps, ledger ratchet, localization, module layers, tests/test_harness.py (725), mock_pms selftest green.
  • TV, debug build on a real server, owner-driven: the play's queue came back as the show's (playqueue: … rows=30), queue transport: Previous went to the episode before and Next came back; the owner checked it.

Not verified: whether PMS lists season-0 specials before S1E1 (Previous from S1E1 could land on one); PMS's window size on a long show; tests/playback_navigation_sim.py's Previous block (needs make sim-macos; CI). The frozen published schema descriptions site/hud/schema/hud/1.0.json/1.1.json still say Previous may be "a restart of this one".

🤖 Generated with Claude Code

GLinnik21 and others added 4 commits November 12, 2026 15:07
…has one to go to

The Previous disc was a Restart from five seconds in: it seeked the playing episode
to 0 (rewriting its playhead and viewOffset) and was disabled again under five
seconds, because a play started fresh (Continue Watching, the detail page's
Play/Resume, Up Next, autoplay) POSTs `uri=<episode>&continuous=1`, and PMS answers
that with [the episode, its successors] only (`playQueueSelectedItemOffset: 0`,
docs/pms-api.md "Up Next"), so the queue had no episode before the playing one.

- A play of an episode whose show is known first asks for the show's queue with the
  episode as its start (`uri=<show>&key=<episode>`, no `continuous`), accepted only
  when the answer selects that episode, and falls back to the old request otherwise.
  When the window opens on the selected row with rows before it, the existing window
  read is repeated once. The show ratingKey is carried by PlaybackRequest from the
  detail page, the queue rows, PlayIntent::Item and episode metadata.
- Previous is the queue step only: `previous_restarts`, `Controls.restart`, the
  restart icon choice and their tests and census rows are removed. The `restart`
  face of the plugin `previous` command still parses (published plugins keep
  loading) and is no longer selected. From beginning stays on the Info tab, the
  More menu (packages that fold it) and the detail hero.
- A handoff's window re-read waits (bounded, 1500 ms) for the outgoing episode's
  `stopped` report, so stepping back to the episode just left does not resume it
  from a stale viewOffset.
- tests/mock_pms.py serves the show-keyed queue; the sim's Previous block follows.

Tests: queue_predecessor_tests (the regression, red against the old request),
the window fence, three hostsim rig tests (Previous mid-episode reports the real
position and seeks nowhere, Previous on the first episode is disabled, Next).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…enu; cite the show-keyed queue section

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… purity note and the fallback's cost

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…alone

tests/test_hud_preview.py calls Library.continuous_queue unbound on a namespace that holds
only items and images; the show-queue change made it call a method that namespace lacks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit 9f43dba into main Nov 12, 2026
23 checks passed
@GLinnik21
GLinnik21 deleted the feat-previous-episode branch November 12, 2026 13:25
GLinnik21 added a commit that referenced this pull request Nov 12, 2026
)

## What

The v0.10.0 release note and audit, revised for the third candidate, which is promoted to the release.

- **Note:** a Fixed line for the styled-ASS work ([#1347](#1347), issue #1328), measured with a test file on the development set and not the reporter's file; the Previous line from #1349 now says the show-built queue was seen working against one real server; the Next and Previous feature line no longer speaks of a "queue".
- **Audit:** the third candidate's range (#1347, #1349); the 2026-11-12 `--fps --mock` runs on the development set with their failures and the interleaved parent comparison; the second candidate's package installed over the stable install and byte-checked; per-change rows for #1347 and #1349; a known-issue line for Previous from a show's first episode (specials order undetermined); #1347's build changes; the action-required check re-run (no section owed).

`ci/check-package.py --lint-note` and `--lint-audit` pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
nphil added a commit to nphil/Marquee that referenced this pull request Nov 18, 2026
Previous no longer restarts the current episode after five seconds, which
also rewound the progress Plex had saved for it; it always steps to the
previous episode. A fresh play of an episode now asks the server for the
show's queue with that episode selected, so the episodes before it exist and
Previous is available (the episode-only request stays as the fallback). The
queue re-read at a handoff waits up to 1.5 s for the stop report of the
episode it leaves, so stepping back resumes that episode where it was left.

The upstream commit's play-uri engine changes are not taken.

Ported from upstream 9f43dba (Player: Previous always plays the previous episode, and a fresh play has one to go to (plxnative#1349)).
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.

1 participant