aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/src/meshbay_node/transport
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-08-26 17:18:37 +0200
committerChristophe Besson <cbesson@gmail.com>2026-08-26 17:18:37 +0200
commit80cb6c4dc5f22336387f2ac74ef2cb85cf2cf7d4 (patch)
tree590e2daf81b2feef674f1bd580b9bf40f83addad /packages/meshbay-node/src/meshbay_node/transport
parentca62b4123b854fc9ece258e14c84c895aaa275cd (diff)
parent59289b82dc8af08c605fd247c90a5c5ec92c6db3 (diff)
downloadmeshbay-80cb6c4dc5f22336387f2ac74ef2cb85cf2cf7d4.tar.gz
Merge branch 'feat/video-type-filter'
Videos app grouping and TMDB matching fixes, plus a new toolbar filter: - A season-like ancestor folder (numbered season, or Specials/Bonus/Extras -> season 0) now names the show from its own root folder, unconditionally — never a per-file guessit title, which cannot tell a show's real name from an individual episode's own one-off name when the filename carries no reliable ShowName/SxxExx structure. Fixes a real show's episodes and Specials folder alike showing up as dozens of individual "movies", each matched against TMDB by its own one-off title. - The ancestor walk continues past every consecutive season-like folder, not just the first — a per-season Bonus folder is nested two levels inside the show, and stopping at the first would name the season as the show. - A season spanning more than one folder (a per-book Bonus folder nested inside every numbered season) no longer hands out colliding episode numbers independently in each one. - guessit's own episode number is not trusted when it comes from a bare 3-digit leading number ("100" parses as season=1/episode=0, not episode=100) — read directly via regex instead. - Recognizes "S1"/"S2"-style abbreviated season folders, not just full words ("Season"/"Saison"/"Livre") — a real show organized its later seasons this way and they never got the ancestor-based grouping fix at all. - The TMDB match cache is no longer trusted across a movie<->show reclassification it doesn't know happened. - New: an All/Movies/Series filter in the Videos toolbar, to the left of the search field, defaulting to "All"; wraps correctly on mobile. Verified live against the real libraries these were found on throughout — not synthetic reproduction alone. 430 hub tests + 667 node tests passing.
Diffstat (limited to 'packages/meshbay-node/src/meshbay_node/transport')
-rw-r--r--packages/meshbay-node/src/meshbay_node/transport/webrtc_server.py16
1 files changed, 14 insertions, 2 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 f95e59e..252e202 100644
--- a/packages/meshbay-node/src/meshbay_node/transport/webrtc_server.py
+++ b/packages/meshbay-node/src/meshbay_node/transport/webrtc_server.py
@@ -2914,8 +2914,20 @@ class WebRTCPeerSession:
meta = None
tmdb_id = None
if cached is not None:
- tmdb_id, media_type = cached
- meta = await media_cache.get_tmdb_meta(tmdb_id, media_type)
+ cached_tmdb_id, cached_media_type = cached
+ # Trustworthy only if it still agrees with what this file
+ # resolves to *now*. season/episode come from index-time
+ # enrichment (enrich.py), which can reclassify a file between
+ # movie and show on a later scan without this cache knowing —
+ # it is keyed by the file's content hash alone, which a
+ # reclassification never changes. Found live: an enrichment fix
+ # to a Specials-folder bug reclassified hundreds of files from
+ # "movie" to "tv", and every one kept answering with its
+ # stale movie-era match forever, because this was trusted
+ # before ever comparing media_type against the current one.
+ if cached_media_type == media_type:
+ tmdb_id = cached_tmdb_id
+ meta = await media_cache.get_tmdb_meta(tmdb_id, media_type)
if meta is None:
result, ratio = await self._tmdb_search(tmdb_client, entry, is_show)