feat(plex): every show card plays the episode it would put on
A show card's picture opened the show page everywhere but Home, whose shelves carried the
resolved `next`. Now every Plex picture plays: a show asks `GET /api/plex/show/{id}/next`
(the in-progress episode, else the first unwatched, else S1·E1 — the rule Home and the show
page's Resume follow) on the click, fresh each time. A started show shows Continue + Restart;
its title, an ⓘ and the menu's "Open show" row open its page; one with no episodes opens there.
The question is asked per show, never carried on every card: three probes a show would cost a
grid page up to 180 queries. The hover preview asks it once it opens and names the episode
("Next: S6·E16 — Title"). Related shows on a show page play the same way.
This commit is contained in:
@@ -134,6 +134,10 @@ export const qk = {
|
||||
showId !== undefined
|
||||
? (["plex-show", showId, ...(lang ? [lang] : [])] as const)
|
||||
: (["plex-show"] as const),
|
||||
// A show card's next episode. Its own root, not under `plex-show`: a watch write anywhere moves
|
||||
// it, and the card reads it fresh (staleTime 0) instead of trusting every write site to invalidate.
|
||||
plexShowNext: (showId: string, lang?: string) =>
|
||||
["plex-show-next", showId, ...(lang ? [lang] : [])] as const,
|
||||
plexItem: (id: string, lang?: string) => ["plex-item", id, ...(lang ? [lang] : [])] as const,
|
||||
// Extraction state of one subtitle track. Not keyed by the playhead: the position is an argument
|
||||
// that steers the background extraction, not part of the track's identity.
|
||||
|
||||
Reference in New Issue
Block a user