From 2bfe7d53ebbedacd39554b58dccb16b2f0aec145 Mon Sep 17 00:00:00 2001 From: npeter83 Date: Mon, 17 Aug 2026 20:21:29 +0200 Subject: [PATCH] =?UTF-8?q?fix(plex):=20S6=20=E2=80=94=20thread=20lang=20i?= =?UTF-8?q?nto=20the=20player's=20item=5Fdetail=20query?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found by the HU-overlay E2E: PlexPlayer fetched qk.plexItem(id) WITHOUT lang, so the in-player title/summary/rich detail stayed English even in HU mode while the grid showed Hungarian (e.g. the player header read "127 Hours" over a grid of "127 óra"). The S6 FE pass threaded lang through the grid, facets, info-page and show queries but missed the player's own detail fetch. Now keyed by plexLang() like the rest, so the player matches the active language. FE gate: tsc / knip / lint clean; queryKeys tests pass. Verified live — the player header now reads "127 óra" in HU mode. --- frontend/src/components/PlexPlayer.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/PlexPlayer.tsx b/frontend/src/components/PlexPlayer.tsx index 108ca1a3..1fe3eef3 100644 --- a/frontend/src/components/PlexPlayer.tsx +++ b/frontend/src/components/PlexPlayer.tsx @@ -2,6 +2,7 @@ import { Fragment, lazy, Suspense, useCallback, useEffect, useRef, useState } fr import { qk } from "../lib/queryKeys"; import { createPortal } from "react-dom"; import { useTranslation } from "react-i18next"; +import { plexLang } from "../i18n"; import { useQuery, useQueryClient } from "@tanstack/react-query"; import Hls from "hls.js"; import { @@ -77,7 +78,12 @@ export default function PlexPlayer({ itemId, onClose, queue }: Props) { tRef.current = t; const qc = useQueryClient(); const [id, setId] = useState(itemId); - const detailQ = useQuery({ queryKey: qk.plexItem(id), queryFn: () => api.plexItem(id) }); + // Serve the player's title/summary/rich detail in the active language (E5 S6), matching the grid. + const lang = plexLang(); + const detailQ = useQuery({ + queryKey: qk.plexItem(id, lang), + queryFn: () => api.plexItem(id, lang), + }); const detail = detailQ.data; const duration = detail?.duration_seconds ?? 0;