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
15 changed files with 855 additions and 531 deletions

View File

@@ -296,6 +296,7 @@ export const assetStub = {
isFavorite: false,
isArchived: false,
duration: null,
libraryId: 'library-id',
isVisible: true,
isExternal: false,
livePhotoVideo: null,

View File

@@ -5,6 +5,7 @@ import { Mocked, vitest } from 'vitest';
export const newAssetRepositoryMock = (): Mocked<RepositoryInterface<AssetRepository>> => {
return {
create: vitest.fn(),
createAll: vitest.fn(),
upsertExif: vitest.fn(),
upsertJobStatus: vitest.fn(),
getByDayOfYear: vitest.fn(),
@@ -23,6 +24,8 @@ export const newAssetRepositoryMock = (): Mocked<RepositoryInterface<AssetReposi
getAll: vitest.fn().mockResolvedValue({ items: [], hasNextPage: false }),
getAllByDeviceId: vitest.fn(),
getLivePhotoCount: vitest.fn(),
getAllInLibrary: vitest.fn(),
getLibraryAssetCount: vitest.fn(),
updateAll: vitest.fn(),
updateDuplicates: vitest.fn(),
getByLibraryIdAndOriginalPath: vitest.fn(),
@@ -39,5 +42,8 @@ export const newAssetRepositoryMock = (): Mocked<RepositoryInterface<AssetReposi
getDuplicates: vitest.fn(),
upsertFile: vitest.fn(),
upsertFiles: vitest.fn(),
detectOfflineExternalAssets: vitest.fn(),
filterNewExternalAssetPaths: vitest.fn(),
updateByLibraryId: vitest.fn(),
};
};