Files
yellowjacket/backend
yonlu 3c3102aac6 fix: start index build only after ALL library scans complete
FullRescan scans the first library directly, then queues the rest.
The PostScan hook was restarting the index build after the FIRST
library, which starved the queued libraries for DB access — they
never scanned, leaving the library with only 6 tracks.

Fix: move StartIndexBuild to the OnAllScansComplete hook, which
fires when drainQueue finds no more libraries to scan. This ensures
ALL libraries finish scanning before the index build starts.

For startup soft scans: if no scans were queued (library unchanged),
start the index build directly. If scans WERE queued, the hook
handles it.

Added OnAllScansComplete callback to ScanHooks. Called from
drainQueue when the scan pipeline goes idle.
2026-03-28 10:25:04 -04:00
..