mirror of
https://github.com/immich-app/immich.git
synced 2025-12-30 01:11:52 +03:00
fix(server): person repo methods (#12524)
This commit is contained in:
@@ -584,18 +584,15 @@ export class MetadataService {
|
||||
this.logger.debug(`Creating missing persons: ${missing.map((p) => `${p.name}/${p.id}`)}`);
|
||||
}
|
||||
|
||||
const newPersons = await this.personRepository.create(missing);
|
||||
const newPersonIds = await this.personRepository.createAll(missing);
|
||||
|
||||
const faceIds = await this.personRepository.replaceFaces(asset.id, discoveredFaces, SourceType.EXIF);
|
||||
this.logger.debug(`Created ${faceIds.length} faces for asset ${asset.id}`);
|
||||
|
||||
await this.personRepository.update(missingWithFaceAsset);
|
||||
await this.personRepository.updateAll(missingWithFaceAsset);
|
||||
|
||||
await this.jobRepository.queueAll(
|
||||
newPersons.map((person) => ({
|
||||
name: JobName.GENERATE_PERSON_THUMBNAIL,
|
||||
data: { id: person.id },
|
||||
})),
|
||||
newPersonIds.map((id) => ({ name: JobName.GENERATE_PERSON_THUMBNAIL, data: { id } })),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user