feat(plex): every card rail in the reader's language; an episode in a poster rail stands as its show (E30 S1b)
The grid served Hungarian titles, but every other card surface (Discover rails, the show page's episodes, search, collections, the person page, playlists, Home's resume rail, hero and comfort shelf) served English. The card serializers now take a required keyword-only lang (a forgotten call site fails instead of going English), and each of those reads takes ?lang=hu, with the language in its query key. A Hungarian search finds an episode by its Hungarian title too. An episode on a poster rail showed its 16:9 still cropped into a poster, titled only with the episode name; it now shows the show's poster and name, with S·E · title under it (option A). Plex's generic season names (Season 1, Specials) are rebuilt from the number in the reader's language; a season with a name of its own keeps it. Home's comfort-shelf move wrote its optimistic order to the key without the language, which nothing read any more; it writes the query's own key.
This commit is contained in:
@@ -125,7 +125,7 @@ export const qk = {
|
||||
// finish it, and it was still the answer on screen with a zeroed progress bar.
|
||||
discover: (...rest: unknown[]) => ["discover", ...rest],
|
||||
discoverPick: (...rest: unknown[]) => ["discover", "pick", ...rest],
|
||||
comfortPins: () => ["comfort-pins"] as const,
|
||||
comfortPins: (lang?: string) => ["comfort-pins", ...(lang ? [lang] : [])] as const,
|
||||
plex: () => ["plex"] as const,
|
||||
plexWatchLink: () => ["plex-watch-link"] as const,
|
||||
plexLibrary: (...rest: unknown[]) => ["plex-library", ...rest],
|
||||
@@ -150,11 +150,14 @@ export const qk = {
|
||||
// that steers the background extraction, not part of the track's identity.
|
||||
plexSubtitle: (id: string, ord: number) => ["plex-subtitle", id, ord] as const,
|
||||
plexPlaylists: (...rest: unknown[]) => ["plex-playlists", ...rest],
|
||||
plexPlaylist: (playlistId: number) => ["plex-playlist", playlistId] as const,
|
||||
// `lang` as on plexShow: omit it for a prefix that matches both languages.
|
||||
plexPlaylist: (playlistId: number, lang?: string) =>
|
||||
["plex-playlist", playlistId, ...(lang ? [lang] : [])] as const,
|
||||
plexCollections: (...rest: unknown[]) => ["plex-collections", ...rest],
|
||||
// facetKey is a filters-derived OBJECT segment (not a scalar), so this key is heterogeneous too.
|
||||
plexFacets: (...rest: unknown[]) => ["plex-facets", ...rest],
|
||||
plexPeopleCards: (scope: string, actors: string[]) =>
|
||||
["plex-people-cards", scope, actors] as const,
|
||||
plexPerson: (name: string) => ["plex-person", name] as const,
|
||||
plexPerson: (name: string, lang?: string) =>
|
||||
["plex-person", name, ...(lang ? [lang] : [])] as const,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user