feat(plex): a title opens its page, the picture plays; an episode links up

A card title lit like a link but played the item. Now the picture plays and
the title opens the page of what it names: a movie's or an episode's info
page, a show's page, and for an episode standing as its show (Recently
watched) the show. Every poster and episode card carries it (grid, rails,
person, collection, season, related, Home), a card with no page keeps a plain
title, and the season page gains the menu's Details row too.

The episode page had no way up: the detail now serves the show's and the
season's rating keys, and on the page the show title opens the show and
"S1·E25" the season (Back returns to where the page was).
This commit is contained in:
2026-10-09 00:06:18 +02:00
parent 5f42ff61c8
commit 4c7f73af9d
14 changed files with 227 additions and 14 deletions
+20
View File
@@ -338,8 +338,11 @@ export default function PlexBrowse() {
scrollRef.current = scroller()?.scrollTop ?? 0;
sub.open({ kind: "player", id: card.id, fromStart: true });
}
// A card's page: a show's own page, a movie's or an episode's info page (the card menu's "Details",
// and a card title's link).
function onInfo(card: PlexCard) {
scrollRef.current = scroller()?.scrollTop ?? 0;
if (card.type === "show") return void sub.open({ kind: "show", id: card.id });
rememberInfoScroll(0); // fresh info page starts at the top
sub.open({ kind: "info", id: card.id });
}
@@ -461,6 +464,20 @@ export default function PlexBrowse() {
onPlayItem={(id, fromStart) => sub.open({ kind: "player", id, fromStart })}
onFilter={applyFilter}
onOpenPerson={onOpenPerson}
// Up to the show or season: Back returns to this page where it was (as from a cast row).
onOpenShow={(showId) => {
rememberInfoScroll(scroller()?.scrollTop ?? 0);
sub.open({ kind: "show", id: showId });
}}
onOpenSeason={(showId, seasonId) => {
rememberInfoScroll(scroller()?.scrollTop ?? 0);
sub.open({ kind: "season", showId, seasonId });
}}
// A collection strip's title: another info page, from its top.
onOpenInfo={(id) => {
rememberInfoScroll(0);
sub.open({ kind: "info", id });
}}
/>
);
}
@@ -504,6 +521,7 @@ export default function PlexBrowse() {
showId={showId}
seasonId={seasonId}
onBack={sub.back}
onInfoCard={onInfo}
onPlay={(epRk, queue, fromStart) =>
sub.open({ kind: "player", id: epRk, queue, fromStart })
}
@@ -707,6 +725,7 @@ export default function PlexBrowse() {
navIndex={i}
card={c}
onOpen={() => onCard(c)}
onPage={onInfo}
onRestart={() => onRestartCard(c)}
onToggleWatched={toggleWatched}
onAdd={actions.add}
@@ -730,6 +749,7 @@ export default function PlexBrowse() {
ep={ep}
withShowTitle
onPlay={() => onCard(ep)}
onPage={() => onInfo(ep)}
onRestart={() => onRestartCard(ep)}
onToggleWatched={() => toggleWatched(ep)}
onAdd={() => epActions.add(ep)}