Bugs fixed:
- Partial rescans no longer replace whole index entries: Upsert events now
carry the scanned torrent paths and IndexStore merges partial rebuilds,
so touching one season no longer drops the others from listings.
- Deleted torrents are now detected: discovery reports the full candidate
set via a new Sync event after each completed scan, and the store prunes
file entries/episodes/seasons/items whose torrents vanished.
- Seen mtimes are committed only after a scan completes successfully, so
cancelled/failed scans retry their items.
- Showreel worker no longer rebroadcasts stale whole items; it sends narrow
MovieShowreel/EpisodeReel events that update only reel fields.
- Permanently failing reel generations (e.g. DoVi/libplacebo on GPU-less
machines) and short-video re-queueing are no longer retried every scan:
reel outcomes persist in reel-state.json with exponential backoff.
Optimizations:
- Persist scan state (scan-state.json) and ffmpeg probe results
(probe-cache.json, keyed by mtime+size, failures included) under
.mediahive/, written only when changed. A warm restart over an unchanged
library drops from ~57 s + 467 queued reel tasks to ~0.2 s with an empty
queue (measured on a 163-item root).
- Bounded parallelism (semaphores + gather) for cast-profile downloads,
TMDb title lookups, and season-detail fetches.
- Incremental TMDb-id index bookkeeping instead of rebuilding per upsert;
removed dead trigger_scan.
See docs/scanning-review.md for the full findings/fixes/measurements report.
- Remove legacy endpoints: /api/change-folder, /api/index, /api/scan, /api/status,
/api/playback/resume-positions
- Remove legacy global scanner module-level API from hivescan/scanner.py
- Defer all filesystem validation to background task in server lifespan (macOS-safe)
- CLI and winmain pass raw paths via MEDIAHIVE_ROOTS; no pre-startup validation
- Enforce POSIX paths everywhere (as_posix(), no backslash leakage)
- Remove MEDIAHIVE_PATH and MEDIAHIVE_DEFER_INITIAL_ROOT env vars
- Update frontend api.ts to use per-root resume positions
- Update docs/API.md and docs/multi-index-plan.md
- Fix Python 2 style except clauses in hivescan/utils.py and scanning.py