Tankōbon / main/services/library-cleanup / LibraryCleaner
Interface: LibraryCleaner
Defined in: main/services/library-cleanup.ts:28
The cleanup as the handlers use it; built once in main.ts.
Methods
analyze()
analyze(
ids,onProgress):Promise<CleanupAnalysisResult>
Defined in: main/services/library-cleanup.ts:33
Lists the non-image files of the books ids (the whole library when empty), grouped by extension, and remembers the result under the returned token. Reports progress book by book.
Parameters
ids
string[]
onProgress
(progress) => void
Returns
Promise<CleanupAnalysisResult>
apply()
apply(
token,keptExtensions,onProgress):Promise<CleanupResult>
Defined in: main/services/library-cleanup.ts:38
Removes the files of the analysis token from the archives, except the kinds whose extension is in keptExtensions. The token works once.
Parameters
token
string
keptExtensions
string[]
onProgress
(progress) => void
Returns
Promise<CleanupResult>