aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-client/src/main.js
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-08-25 12:52:32 +0200
committerChristophe Besson <cbesson@gmail.com>2026-08-25 12:52:32 +0200
commit9e66c11b15b7103e963dcecf88fb152ed1e74253 (patch)
tree6ef831d5616af824eb3293d769ac9473ebada0a7 /packages/meshbay-client/src/main.js
parent2fcdd07d1e5d331ad02b723f1c45603a0989c264 (diff)
downloadmeshbay-9e66c11b15b7103e963dcecf88fb152ed1e74253.tar.gz
fix(node): make Photos/Video/Music enrichment survive node restarts
Only thumbnail bytes were ever durable in media_cache.db — every other derived field (photo width/height/EXIF, video ffprobe duration/dims, audio cover art) lived solely on the in-memory GroupIndex entry, so a node restart re-decoded every photo through Pillow, re-ran ffprobe on every video, and re-scanned for every album cover from scratch, even though the answers already sat in the cache. Adds photo_meta and video_meta tables (content-only fields, keyed by file_id) and checks them before doing the expensive work. Audio gets no new table: mutagen reads tags and duration in one inseparable call, so caching duration alone buys nothing — instead cover-art extraction alone is skipped via a new skip_cover flag when a cached cover already exists. Deliberately excluded from all three caches: anything derived from the filename or folder path (video display_title/season/episode via guessit, audio artist/album folder-fallback) — those must keep being recomputed fresh so a rename/move is still correctly re-derived by the existing _reenrich_renamed_*_entries mechanisms, instead of silently handing back a stale parse under the new name/location. Regression tests prove cache reuse by deleting the source file (or cover) between two enrichment runs, and prove rename/move correctness survives the new cache by renaming/moving to a path that never exists on disk.
Diffstat (limited to 'packages/meshbay-client/src/main.js')
0 files changed, 0 insertions, 0 deletions