mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
fix(server): deduplicate integity checks missing paths
This commit is contained in:
parent
622a330d82
commit
42782bf842
1 changed files with 4 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue