aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/src/meshbay_node/media_cache.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-08-29 16:07:03 +0200
committerChristophe Besson <cbesson@gmail.com>2026-08-29 16:07:03 +0200
commit78eef92bfa3513a81ac64d4377f8300c533aaa6c (patch)
treee056e6b4fceca76ab67586548f0aa6ed80f925bc /packages/meshbay-node/src/meshbay_node/media_cache.py
parent236e5e811355212945b89c4f7a99df5c837e97c7 (diff)
parent4d167e9f958d26c1db920274974ae446426928e3 (diff)
downloadmeshbay-78eef92bfa3513a81ac64d4377f8300c533aaa6c.tar.gz
Merge branch 'feat/videos-matching-v8-v13'
Diffstat (limited to 'packages/meshbay-node/src/meshbay_node/media_cache.py')
-rw-r--r--packages/meshbay-node/src/meshbay_node/media_cache.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/meshbay-node/src/meshbay_node/media_cache.py b/packages/meshbay-node/src/meshbay_node/media_cache.py
index 4600a09..8233270 100644
--- a/packages/meshbay-node/src/meshbay_node/media_cache.py
+++ b/packages/meshbay-node/src/meshbay_node/media_cache.py
@@ -175,6 +175,18 @@ class MediaCache:
"(SELECT file_id FROM tmdb_override)", (file_id,))
await self._db.commit()
+ async def drop_tmdb_match(self, file_id: str) -> None:
+ """
+ Full per-file reset: forget the match *and* any manual override
+ marker, so the next `media_meta_req` re-resolves from scratch with
+ the current matcher. This is the explicit operator "re-match this
+ one" action (ยง10.1/V13) โ€” deliberately stronger than
+ `clear_file_tmdb`, which spares an override.
+ """
+ await self._db.execute("DELETE FROM file_tmdb WHERE file_id = ?", (file_id,))
+ await self._db.execute("DELETE FROM tmdb_override WHERE file_id = ?", (file_id,))
+ await self._db.commit()
+
async def clear_tmdb_matches(self, file_ids: list[str]) -> int:
"""
Drop the auto-resolved file->tmdb mappings for these files so the