mirror of
https://github.com/immich-app/immich.git
synced 2025-03-11 02:23:09 -05:00
feat(server): default exclusion patterns (#12566)
* Add default exclusion patterns * simplify * fix tests
This commit is contained in:
parent
9b528519e4
commit
233372303b
3 changed files with 6 additions and 6 deletions
|
@ -83,7 +83,7 @@ describe('/libraries', () => {
|
|||
refreshedAt: null,
|
||||
assetCount: 0,
|
||||
importPaths: [],
|
||||
exclusionPatterns: [],
|
||||
exclusionPatterns: expect.any(Array),
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
@ -270,7 +270,7 @@ describe('/libraries', () => {
|
|||
refreshedAt: null,
|
||||
assetCount: 0,
|
||||
importPaths: [],
|
||||
exclusionPatterns: [],
|
||||
exclusionPatterns: expect.any(Array),
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
|
|
@ -892,7 +892,7 @@ describe(LibraryService.name, () => {
|
|||
expect.objectContaining({
|
||||
name: expect.any(String),
|
||||
importPaths: [],
|
||||
exclusionPatterns: [],
|
||||
exclusionPatterns: expect.any(Array),
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
@ -917,7 +917,7 @@ describe(LibraryService.name, () => {
|
|||
expect.objectContaining({
|
||||
name: 'My Awesome Library',
|
||||
importPaths: [],
|
||||
exclusionPatterns: [],
|
||||
exclusionPatterns: expect.any(Array),
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
@ -947,7 +947,7 @@ describe(LibraryService.name, () => {
|
|||
expect.objectContaining({
|
||||
name: expect.any(String),
|
||||
importPaths: ['/data/images', '/data/videos'],
|
||||
exclusionPatterns: [],
|
||||
exclusionPatterns: expect.any(Array),
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
|
|
@ -245,7 +245,7 @@ export class LibraryService {
|
|||
ownerId: dto.ownerId,
|
||||
name: dto.name ?? 'New External Library',
|
||||
importPaths: dto.importPaths ?? [],
|
||||
exclusionPatterns: dto.exclusionPatterns ?? [],
|
||||
exclusionPatterns: dto.exclusionPatterns ?? ['**/@eaDir/**', '**/._*'],
|
||||
});
|
||||
return mapLibrary(library);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue