mirror of
https://github.com/immich-app/immich.git
synced 2025-12-18 01:11:07 +03:00
fix(server): prevent feedback loop during library scan (#7944)
* prevent feedback loop * add nesting * made nesting less ugly --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
16
server/test/fixtures/library.stub.ts
vendored
16
server/test/fixtures/library.stub.ts
vendored
@@ -1,4 +1,6 @@
|
||||
import { APP_MEDIA_LOCATION, THUMBNAIL_DIR } from '@app/domain';
|
||||
import { LibraryEntity, LibraryType } from '@app/infra/entities';
|
||||
import { join } from 'node:path';
|
||||
import { userStub } from './user.stub';
|
||||
|
||||
export const libraryStub = {
|
||||
@@ -100,4 +102,18 @@ export const libraryStub = {
|
||||
isVisible: true,
|
||||
exclusionPatterns: ['**/dir1/**'],
|
||||
}),
|
||||
hasImmichPaths: Object.freeze<LibraryEntity>({
|
||||
id: 'library-id1337',
|
||||
name: 'importpath-exclusion-library1',
|
||||
assets: [],
|
||||
owner: userStub.admin,
|
||||
ownerId: 'user-id',
|
||||
type: LibraryType.EXTERNAL,
|
||||
importPaths: [join(THUMBNAIL_DIR, 'library'), '/xyz', join(APP_MEDIA_LOCATION, 'library')],
|
||||
createdAt: new Date('2023-01-01'),
|
||||
updatedAt: new Date('2023-01-01'),
|
||||
refreshedAt: null,
|
||||
isVisible: true,
|
||||
exclusionPatterns: ['**/dir1/**'],
|
||||
}),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user