Tankōbon / main/services/library-organization / LibraryOrganizer
Interface: LibraryOrganizer
Defined in: main/services/library-organization.ts:73
The library organization (AppSettings.libraryOrganization) as the handlers use it; built once in main.ts.
Properties
lock
lock:
LibraryRunLock
Defined in: main/services/library-organization.ts:94
The lock shared with the resynchronizer.
Methods
afterAdd()
afterAdd(
added):Promise<OrganizationOutcome>
Defined in: main/services/library-organization.ts:83
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: main/services/library-organization.ts:87
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: main/services/library-organization.ts:85
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: main/services/library-organization.ts:92
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: main/services/library-organization.ts:78
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[]