aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/video-app.js
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-08-29 15:57:06 +0200
committerChristophe Besson <cbesson@gmail.com>2026-08-29 15:57:06 +0200
commit4d167e9f958d26c1db920274974ae446426928e3 (patch)
treee056e6b4fceca76ab67586548f0aa6ed80f925bc /packages/meshbay-hub/src/meshbay_hub/static/video-app.js
parentbc40ab2c4486cca4ae63e33976151b5d7f856a84 (diff)
downloadmeshbay-4d167e9f958d26c1db920274974ae446426928e3.tar.gz
feat: V13 — per-card "re-match this one file" (MNP 0.13)
A one-click alternative to the full "Fix match" search-and-pick flow, and reachable without SSH (`meshbay-node video rematch` clears a whole group). - MNP 0.13: tmdb_rematch / tmdb_rematch_ack (additive — an older node logs "unknown type", the button just does nothing). OP_TMDB_REMATCH, signed like tmdb_override (media_cache is shared node-wide). - media_cache.drop_tmdb_match(file_id): forgets the match AND the override marker — deliberately stronger than clear_file_tmdb, since the operator is explicitly asking for a fresh resolution. - webrtc_server: _do_tmdb_rematch / _admin_exec_tmdb_rematch, dispatch + admin-response routing, broadcasts tmdb_rematch_ack. - transport.js: rematchTmdbMatch(fileId, signFn); 'tmdb_rematch' in the admin-op allowlist; tmdb_rematch_ack handled like tmdb_override_ack. - video-app.js: a "Re-match" button beside "Fix match" in the detail modal (isNodeAdmin), then bumpMediaMetaGeneration(). video.rematch_one key in all ten locales. docs/mediacenter.md §10.1: V8–V13 marked done. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018BMLQjqFGCize2KtNBT79v
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/video-app.js')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/video-app.js25
1 files changed, 22 insertions, 3 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 48709f9..6d13e27 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/video-app.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/video-app.js
@@ -482,8 +482,22 @@ function VideoDetailModal({
}) {
const confident = Boolean(meta && meta.confidence && meta.tmdb_id);
const [searching, setSearching] = useState(false);
+ const [rematching, setRematching] = useState(false);
const mediaType = show ? 'tv' : 'movie';
+ // §10.1/V13: drop this file's cached match on the node and let it
+ // re-resolve with the current matcher — the one-click alternative to the
+ // full search-and-pick flow above.
+ const doRematch = useCallback(async () => {
+ if (rematching) return;
+ setRematching(true);
+ try {
+ await transportRef.current.rematchTmdbMatch(repEntry.id, buildSignFn(transportRef));
+ bumpMediaMetaGeneration();
+ } catch { /* leave the current match in place */ }
+ setRematching(false);
+ }, [rematching, repEntry, transportRef]);
+
// Reset whenever a different file/show is opened in this same modal
// instance — repEntry/show change identity, selectedSeason must not
// silently keep pointing at whatever the previous show's season 4 was.
@@ -535,9 +549,14 @@ function VideoDetailModal({
`}
`}
${isNodeAdmin && html`
- <button class="admin-btn video-fix-match" onClick=${() => setSearching(true)}>
- ${t('video.fix_match')}
- </button>
+ <div class="video-admin-actions">
+ <button class="admin-btn video-fix-match" onClick=${() => setSearching(true)}>
+ ${t('video.fix_match')}
+ </button>
+ <button class="admin-btn" onClick=${doRematch} disabled=${rematching}>
+ ${rematching ? html`<span class="spinner"></span>` : t('video.rematch_one')}
+ </button>
+ </div>
`}
${showMultiSeason && html`
<${SeasonTabs} seasons=${show.seasons} selected=${selectedSeason}