fix(plex): Restart only where an episode has a resume point; the Surprise draw is re-read, not redrawn
Show cards carry resumable (ShowState, from the same rollup) so a part-watched show whose next episode is untouched offers Play, not a Continue and a Restart that do the same thing; plexStarted is the one rule for cards and menus. The Surprise rail's key sits under the discover root: whatever refreshes the rails re-reads the draw (keep=) with its watch state now, kept past the 5-minute gc, and only the reshuffle deals. Closing the player refreshes the Discover rails. A show card's play acts on the last click only, and only where it was made.
This commit is contained in:
@@ -123,10 +123,11 @@ export const qk = {
|
||||
// refetches it alone.
|
||||
plexDiscover: (...rest: unknown[]) => ["plex-discover", ...rest],
|
||||
// Variadic like plexDiscover so it can key by scope + lang + the active filters (lang because a genre
|
||||
// filter narrows against the language-specific genre column, like the grid). The ↻ reshuffle is the
|
||||
// query's own refetch, and nothing invalidates this key — deliberately: a watched toggle flips the
|
||||
// card in place (and reverts it on a failure) rather than reshuffle the rail under the viewer.
|
||||
plexSurprise: (...rest: unknown[]) => ["plex-surprise", ...rest],
|
||||
// filter narrows against the language-specific genre column, like the grid). UNDER the discover root,
|
||||
// so whatever refreshes the rails (a watched toggle, a player closing) refreshes this one too: its
|
||||
// refetch reads the same draw again (`keep`), and only the ↻ deals a new one. As a sibling root the
|
||||
// draw's cards kept the watch state they were drawn with.
|
||||
plexSurprise: (...rest: unknown[]) => ["plex-discover", "surprise", ...rest],
|
||||
plexSuggest: (...rest: unknown[]) => ["plex-suggest", ...rest],
|
||||
// Optional trailing `lang`: a language switch remounts the detail with a new key so HU/EN
|
||||
// metadata is cached separately. Omitting it (e.g. for a prefix invalidation) still matches both.
|
||||
|
||||
Reference in New Issue
Block a user