summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/group-page.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/group-page.js')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/group-page.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/group-page.js b/packages/meshbay-hub/src/meshbay_hub/static/group-page.js
index 55f8e36..aa6b29c 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/group-page.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/group-page.js
@@ -207,7 +207,9 @@ function GroupPage({ groupId, group, token, username, userId, userPrefs,
setEnabledApps(ack.enabled_apps || null);
setScanSettings(ack.scan_settings || null);
setTmdbConfig({
+ // Per-group (2026-08-24, used to be node-wide).
enabled: ack.tmdb_enabled !== false,
+ // Node-wide — one shared credential/cache.
tokenCustomized: !!ack.tmdb_token_customized,
language: ack.tmdb_language || '',
});
@@ -217,7 +219,13 @@ function GroupPage({ groupId, group, token, username, userId, userPrefs,
// and a button that is still there is a button people press.
transport.onUploadPolicy = (allowed) => setMemberUpload(allowed);
transport.onAppsEnabled = (apps) => setEnabledApps(apps);
- transport.onTmdbConfig = (cfg) => setTmdbConfig(cfg);
+ // Two independent acks now (tmdb_config_ack: token/language,
+ // node-wide; tmdb_enabled_ack: the per-group switch) — each merges
+ // its own slice into the one tmdbConfig object rather than
+ // replacing it, so one changing does not clobber the other's most
+ // recent value.
+ transport.onTmdbConfig = (cfg) => setTmdbConfig((prev) => ({ ...(prev || {}), ...cfg }));
+ transport.onTmdbEnabled = (enabled) => setTmdbConfig((prev) => ({ ...(prev || {}), enabled }));
transport.onVideoRoot = (path) => setVideoRoot(path);
// The node's own scan (a root added while we were already connected,
// or reconcile catching one back up) — never the entries, just
@@ -524,7 +532,8 @@ function GroupPage({ groupId, group, token, username, userId, userPrefs,
scanSettings=${scanSettings}
onScanSettings=${(s) => setScanSettings(s)}
tmdbConfig=${tmdbConfig}
- onTmdbConfig=${(cfg) => setTmdbConfig(cfg)}
+ onTmdbConfig=${(cfg) => setTmdbConfig((prev) => ({ ...(prev || {}), ...cfg }))}
+ onTmdbEnabled=${(enabled) => setTmdbConfig((prev) => ({ ...(prev || {}), enabled }))}
entries=${entries} nodeDirs=${nodeDirs}
videoRoot=${videoRoot}
onVideoRoot=${(path) => setVideoRoot(path)}