mirror of
https://github.com/immich-app/immich.git
synced 2026-07-20 21:02:55 +08:00
fix(server): deduplicate integity checks missing paths
This commit is contained in:
parent
622a330d82
commit
42782bf842
@ -399,7 +399,10 @@ export class IntegrityService extends BaseService {
|
||||
await this.integrityRepository.deleteByIds(outdatedReports);
|
||||
}
|
||||
|
||||
const missingFiles = results.filter(({ exists }) => !exists);
|
||||
const missingFiles = Object.values(
|
||||
Object.fromEntries(results.filter(({ exists }) => !exists).map((file) => [file.path, file])),
|
||||
);
|
||||
|
||||
if (missingFiles.length > 0) {
|
||||
await this.integrityRepository.create(
|
||||
missingFiles.map(({ path, assetId, fileAssetId }) => ({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user