mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00: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:
parent
eea0a98090
commit
a9438a9c2d
5 changed files with 60 additions and 4 deletions
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/**'],
|
||||
}),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue