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.
- Observe the video element itself instead of el.closest('.episode-tile'):
ref callbacks can fire before ancestors are attached, so no tile was
ever observed and the visibility allowlist blocked all playback.
- Use a blocklist for off-screen culling (play until reported off-screen)
so observer lag/failure degrades to the old always-on behavior.
- Default to the first season playing on page view again.
- Keep preload="auto" so tiles show a first-frame preview picture;
playback gating already prevents GPU use from inactive videos.
- Stop videos staggered (same 500ms step as startup) on idle stop,
season switch and scroll culling; same for movie page showreels.
- Add useIdlePreviewPlayback composable: stops preview videos after 30s
without input and restarts them staggered on activity; also stops
while the tab is hidden.
- SeriesFullView: no episode videos play until a season is browsed
(keyboard/gamepad focus or mouse hover); only near-viewport tiles of
the active season play (IntersectionObserver); inactive seasons no
longer preload video data; sync is incremental so playing tiles are
not rewound on scroll.
- MediaDetail: header showreel videos use cancellable stagger timers,
pause when scrolled out of view, and honor the idle stop.
- Images: lazy/async decoding on series page posters; content-visibility:
auto on media cards to skip rendering off-screen row items.