Skeudenn / main/services/library-organization / LibraryOrganizer
Interface: LibraryOrganizer ​
Defined in: src/main/services/library-organization.ts:80
The library organization (AppSettings.libraryOrganization) as the handlers use it; built once in main.ts.
Properties ​
lock ​
lock:
LibraryRunLock
Defined in: src/main/services/library-organization.ts:101
The lock shared with the resynchronizer.
Methods ​
afterAdd() ​
afterAdd(
added):Promise<OrganizationOutcome>
Defined in: src/main/services/library-organization.ts:90
Applies the organization to the comics an addition just brought in (see planOrganization): moves those to move now and keeps the others behind a token for organize().
Parameters ​
added ​
object[]
Returns ​
Promise<OrganizationOutcome>
countUnorganized() ​
countUnorganized():
Promise<UnorganizedCountResult>
Defined in: src/main/services/library-organization.ts:94
How many library comics aren't in their place in the organized folder yet (an error when the organization is off or its folder unreachable).
Returns ​
Promise<UnorganizedCountResult>
organize() ​
organize(
token):Promise<OrganizeResult>
Defined in: src/main/services/library-organization.ts:92
Moves the comics an earlier afterAdd() offered, as the user accepted. A token works once.
Parameters ​
token ​
string
Returns ​
Promise<OrganizeResult>
organizeAll() ​
organizeAll(
onProgress?):Promise<OrganizeResult>
Defined in: src/main/services/library-organization.ts:99
Moves every library comic not in its place yet into the organized folder, one at a time, reporting each through onProgress. Holds the lock, like a resynchronization.
Parameters ​
onProgress? ​
(progress) => void
Returns ​
Promise<OrganizeResult>
watchedFolders() ​
watchedFolders(
folders):string[]
Defined in: src/main/services/library-organization.ts:85
The folders a resynchronization walks: the remembered ones, plus the organized folder when the organization is on (so a comic dropped there by hand is found, then moved into place).
Parameters ​
folders ​
string[]
Returns ​
string[]