feat(server): library refresh go brrr (#14456)

* feat: brr

---------
Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
This commit is contained in:
Jonathan Jogenfors 2025-03-06 16:00:18 +01:00 committed by GitHub
parent bc61497461
commit 3af26ee94a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 855 additions and 531 deletions

View file

@ -208,17 +208,23 @@ export interface IAssetDeleteJob extends IEntityJob {
deleteOnDisk: boolean;
}
export interface ILibraryFileJob extends IEntityJob {
ownerId: string;
assetPath: string;
export interface ILibraryFileJob {
libraryId: string;
paths: string[];
progressCounter?: number;
totalAssets?: number;
}
export interface ILibraryAssetJob extends IEntityJob {
export interface ILibraryBulkIdsJob {
libraryId: string;
importPaths: string[];
exclusionPatterns: string[];
assetIds: string[];
progressCounter: number;
totalAssets: number;
}
export interface IBulkEntityJob extends IBaseJob {
export interface IBulkEntityJob {
ids: string[];
}
@ -354,10 +360,11 @@ export type JobItem =
| { name: JobName.ASSET_DELETION_CHECK; data?: IBaseJob }
// Library Management
| { name: JobName.LIBRARY_SYNC_FILE; data: ILibraryFileJob }
| { name: JobName.LIBRARY_SYNC_FILES; data: ILibraryFileJob }
| { name: JobName.LIBRARY_QUEUE_SYNC_FILES; data: IEntityJob }
| { name: JobName.LIBRARY_QUEUE_SYNC_ASSETS; data: IEntityJob }
| { name: JobName.LIBRARY_SYNC_ASSET; data: ILibraryAssetJob }
| { name: JobName.LIBRARY_SYNC_ASSETS; data: ILibraryBulkIdsJob }
| { name: JobName.LIBRARY_ASSET_REMOVAL; data: ILibraryFileJob }
| { name: JobName.LIBRARY_DELETE; data: IEntityJob }
| { name: JobName.LIBRARY_QUEUE_SCAN_ALL; data?: IBaseJob }
| { name: JobName.LIBRARY_QUEUE_CLEANUP; data: IBaseJob }