Two targeted fixes: the scanner stops doing files in lockstep batches, and Windows users can finally get webhook integration working.
Fixed
- Scanner no longer holds back fast files behind slow ones in the same batch (#300). The previous design processed files in ordered batches of
scanWorkerswith awg.Wait()barrier between batches: one slow thorough decode held back the other N-1 workers in its batch, and all N completions clustered into the sameCURRENT_TIMESTAMPsecond so the scan-detail UI showed identical timestamps for huge chunks at a time. Replaced with a semaphore-bounded worker pool plus a completion bitmap and a contiguous-done watermark ticker. Workers commit theirscan_filesrow as soon as detection finishes; a separate goroutine walks the bitmap forward, advances the watermark over the contiguous prefix of done flags, and flushes it toscans.current_file_indexevery two seconds, owning all DB progress writes for the parallel path so the persisted index stays monotonic. Resume after interruption replays from the watermark to the actual highest-completed index, and migration 010 addsUNIQUE(scan_id, file_path)soRecord(nowINSERT ... ON CONFLICT DO NOTHING) makes the replay window a no-op rather than a duplicate-row error.scanned_atalso moves tostrftime('%Y-%m-%d %H:%M:%f', 'now')millisecond precision so per-file order is visible in the UI. Cancellation and pause are checked per dispatch iteration instead of only at batch boundaries. Closes #290. - Windows UNC paths from Sonarr/Radarr now match the configured scan path (#299). The path matcher used to require the post-prefix remainder to start with a forward slash. When Sonarr or Radarr ran on Windows, every webhook arrived with backslash separators (e.g.
\\srv\share\Movies\Movie (2024)\Movie.mkv); theHasPrefixmatch succeeded but the/-only remainder check rejected it, so every Windows install sawWebhook path mapping failed: no matching scan path found. The matcher now accepts either/or\as a directory-boundary separator, both for the post-prefix remainder check and for stripping trailing separators at load time.\\srv\share\Moviesstill doesn't false-match\\srv\share\MoviesArchive. Reported by alex882001 in #298; the v1.3.6 webhook-auth fix (#293) was a prerequisite for the report — without it the request would have been rejected at the auth gate before ever reaching path mapping.
Documentation
- Post-v1.3.6 docs alignment (#301). README "Alpine packages" claim corrected (Debian-slim + jellyfin-ffmpeg 8 since v1.3.5), "AV1 NVDEC for Intel iGPUs" replaced with the correct AV1/QSV/Alder Lake or Intel Arc requirement,
docker-compose.ymlmount changed from/mnt/mediato/mediato match the convention used everywhere else,agents/FRONTEND.mdupdated to Vite 8 (v1.3.6 bumped it), and theagents/DATABASE.mdmigration table now lists 005-010 instead of stopping at 004.
Full Changelog: v1.3.6...v1.3.7