Tankōbon / main/services/library-scanner / scanIntoLibrary
Function: scanIntoLibrary()
scanIntoLibrary(
repo,directory,onProgress,inspect):Promise<ScanSummary>
Defined in: main/services/library-scanner.ts:60
Adds every comic under directory to the library. Each file has to be opened to learn its page count — that's the slow part, and why onProgress reports file by file. Files already in the library are skipped without being opened, and one unreadable file only costs itself (failed), never the rest of the scan. Opening is inspect's job (the decoder process, which also caches the cover): the scanner itself never parses an archive, it only owns the walk and the database.
Parameters
repo
directory
string
onProgress
(progress) => void
inspect
(filePath) => Promise<ArchiveSummary>
Returns
Promise<ScanSummary>