aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/video-app.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/video-app.js b/packages/meshbay-hub/src/meshbay_hub/static/video-app.js
index 124033e..4c9f90c 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/video-app.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/video-app.js
@@ -976,6 +976,22 @@ function VideoApp({
useEffect(() => { setMode(loadViewMode()); }, [groupId]);
useEffect(() => { setFilter(''); setTypeFilter('all'); }, [groupId]);
+ // When the operator changes the node's TMDB language, the node drops its
+ // metadata cache and refetches in the new language, and — until a language
+ // is set — answers nothing at all rather than querying in English (§9.7).
+ // Tell every mounted tile to redo its media_meta_req and drop the
+ // show-level meta already merged here, so the grid switches language (or
+ // fills in for the first time, right after the operator picks one) without
+ // a page reload. Skip the initial mount: the language is already right then,
+ // and bumping would restorm TMDB on every open of the Videos tab.
+ const tmdbLanguage = tmdbConfig ? (tmdbConfig.language || '') : '';
+ const firstLangRef = useRef(true);
+ useEffect(() => {
+ if (firstLangRef.current) { firstLangRef.current = false; return; }
+ setMetaByGroup({});
+ bumpMediaMetaGeneration();
+ }, [tmdbLanguage]);
+
const setModeAndSave = (m) => { setMode(m); saveViewMode(m); };
const videoEntries = availableEntries || entries;