diff options
Diffstat (limited to 'packages/meshbay-node/src/meshbay_node')
| -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] |