mirror of
https://github.com/immich-app/immich.git
synced 2025-06-01 04:36:19 -04:00
feat(server): default exclusion patterns (#12566)
* Add default exclusion patterns * simplify * fix tests
This commit is contained in:
parent
9b528519e4
commit
233372303b
@ -83,7 +83,7 @@ describe('/libraries', () => {
|
|||||||
refreshedAt: null,
|
refreshedAt: null,
|
||||||
assetCount: 0,
|
assetCount: 0,
|
||||||
importPaths: [],
|
importPaths: [],
|
||||||
exclusionPatterns: [],
|
exclusionPatterns: expect.any(Array),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -270,7 +270,7 @@ describe('/libraries', () => {
|
|||||||
refreshedAt: null,
|
refreshedAt: null,
|
||||||
assetCount: 0,
|
assetCount: 0,
|
||||||
importPaths: [],
|
importPaths: [],
|
||||||
exclusionPatterns: [],
|
exclusionPatterns: expect.any(Array),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -892,7 +892,7 @@ describe(LibraryService.name, () => {
|
|||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
name: expect.any(String),
|
name: expect.any(String),
|
||||||
importPaths: [],
|
importPaths: [],
|
||||||
exclusionPatterns: [],
|
exclusionPatterns: expect.any(Array),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -917,7 +917,7 @@ describe(LibraryService.name, () => {
|
|||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
name: 'My Awesome Library',
|
name: 'My Awesome Library',
|
||||||
importPaths: [],
|
importPaths: [],
|
||||||
exclusionPatterns: [],
|
exclusionPatterns: expect.any(Array),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -947,7 +947,7 @@ describe(LibraryService.name, () => {
|
|||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
name: expect.any(String),
|
name: expect.any(String),
|
||||||
importPaths: ['/data/images', '/data/videos'],
|
importPaths: ['/data/images', '/data/videos'],
|
||||||
exclusionPatterns: [],
|
exclusionPatterns: expect.any(Array),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -245,7 +245,7 @@ export class LibraryService {
|
|||||||
ownerId: dto.ownerId,
|
ownerId: dto.ownerId,
|
||||||
name: dto.name ?? 'New External Library',
|
name: dto.name ?? 'New External Library',
|
||||||
importPaths: dto.importPaths ?? [],
|
importPaths: dto.importPaths ?? [],
|
||||||
exclusionPatterns: dto.exclusionPatterns ?? [],
|
exclusionPatterns: dto.exclusionPatterns ?? ['**/@eaDir/**', '**/._*'],
|
||||||
});
|
});
|
||||||
return mapLibrary(library);
|
return mapLibrary(library);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user