diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-08-26 17:13:32 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-08-26 17:13:32 +0200 |
| commit | ca62b4123b854fc9ece258e14c84c895aaa275cd (patch) | |
| tree | 458b8901cbd590f12463c8623b54ae91b5c42b88 /packages/meshbay-node/src | |
| parent | db7f81fd08742847f3ebea061c75530b7b31b934 (diff) | |
| parent | 3d03692b6cc5e47c4bb49b86707a50cdaa5408f2 (diff) | |
| download | meshbay-ca62b4123b854fc9ece258e14c84c895aaa275cd.tar.gz | |
Merge branch 'fix/tmdb-override-metadata'
An operator's "fix match" correction only ever recorded the file->tmdb_id
mapping, never the metadata that id actually names — so the very next
lookup found nothing cached under the new id and fell straight through to
a fresh automatic search, silently reproducing the original wrong match.
Invisible for two shows whose own title happened to be enough for that
fallback search to land on the right answer anyway; surfaced on a movie
whose own title search kept landing on the same wrong match regardless of
the override.
Verified live after this fix: the same "fix match" action, redone, made
the correction stick this time.
Diffstat (limited to 'packages/meshbay-node/src')
| -rw-r--r-- | packages/meshbay-node/src/meshbay_node/transport/webrtc_server.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/meshbay-node/src/meshbay_node/transport/webrtc_server.py b/packages/meshbay-node/src/meshbay_node/transport/webrtc_server.py index 724527b..f95e59e 100644 --- a/packages/meshbay-node/src/meshbay_node/transport/webrtc_server.py +++ b/packages/meshbay-node/src/meshbay_node/transport/webrtc_server.py @@ -3105,6 +3105,24 @@ class WebRTCPeerSession: if entry is None or media_cache is None: self._send({"type": "error", "detail": "File or media cache not available"}) return + # This only ever recorded the file->tmdb_id mapping, never the + # metadata tmdb_id names — _do_media_meta_request's cache check + # (entry, cache) both agree on media_type, so it trusted the + # mapping — but found nothing under this *new* id in tmdb_meta + # (nothing had ever fetched it), and silently fell through to a + # fresh search using the file's own title, exactly the one that + # produced the wrong match in the first place. Confirmed live: an + # override "stuck" for shows only because their own title happened + # to be enough for that fallback search to land on the right + # answer anyway, coincidentally — never because the override itself + # was actually being honored — and was invisible until a movie + # whose own title search kept landing on the same wrong result + # exposed it. Fetching and storing the real metadata up front is + # what makes the *override* the thing a later lookup finds. + tmdb_client = self._ctx.get("tmdb_client") + if tmdb_client is not None: + meta = await self._tmdb_build_meta(tmdb_client, tmdb_id, media_type, {}) + await media_cache.set_tmdb_meta(tmdb_id, media_type, meta) target_title = entry.display_title or entry.name matched = [e for e in ctx["index"].entries if e.type == "video" and (e.display_title or e.name) == target_title] |