Skeudenn / main/services/image-stats-scanner / ImageStatsScannerOptions
Interface: ImageStatsScannerOptions ​
Defined in: src/main/services/image-stats-scanner.ts:22
How the scanner reaches the rest of the app.
Properties ​
flushIntervalMs? ​
optionalflushIntervalMs?:number
Defined in: src/main/services/image-stats-scanner.ts:35
Spacing of onUpdated calls, so a large library doesn't send one message per book. Defaults to 500 ms.
isOnlineOnly? ​
optionalisOnlineOnly?: (filePath) =>Promise<boolean>
Defined in: src/main/services/image-stats-scanner.ts:29
Whether a file is a cloud placeholder (reading it would download it). Such books are left for later in the session: they are measured once opened. Defaults to never.
Parameters ​
filePath ​
string
Returns ​
Promise<boolean>
measure ​
measure: (
filePath) =>Promise<PageSizeAverage|null>
Defined in: src/main/services/image-stats-scanner.ts:24
Averages a file's page sizes (the decoder process's measure); null when none could be read.
Parameters ​
filePath ​
string
Returns ​
Promise<PageSizeAverage | null>
onProgress ​
onProgress: (
progress) =>void
Defined in: src/main/services/image-stats-scanner.ts:31
Called as the scan advances.
Parameters ​
progress ​
Returns ​
void
onUpdated ​
onUpdated: (
entries) =>void
Defined in: src/main/services/image-stats-scanner.ts:33
Called with the entries just updated, at most once per flushIntervalMs and when the run ends.
Parameters ​
entries ​
Returns ​
void