1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-28 06:31:58 +00:00

fix(server): include archived images in face detection (#8892)

This commit is contained in:
Mert 2024-04-17 23:47:24 -04:00 committed by GitHub
parent a4f805e99b
commit 8573c84605
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -292,7 +292,7 @@ export class PersonService {
const assetPagination = usePagination(JOBS_ASSET_PAGINATION_SIZE, (pagination) => {
return force
? this.assetRepository.getAll(pagination, { orderDirection: 'DESC', withFaces: true })
? this.assetRepository.getAll(pagination, { orderDirection: 'DESC', withFaces: true, withArchived: true })
: this.assetRepository.getWithout(pagination, WithoutProperty.FACES);
});
@ -424,7 +424,7 @@ export class PersonService {
this.logger.debug(`Face ${id} has ${matches.length} matches`);
const isCore = matches.length >= machineLearning.facialRecognition.minFaces;
const isCore = matches.length >= machineLearning.facialRecognition.minFaces && !face.asset.isArchived;
if (!isCore && !deferred) {
this.logger.debug(`Deferring non-core face ${id} for later processing`);
await this.jobRepository.queue({ name: JobName.FACIAL_RECOGNITION, data: { id, deferred: true } });