This commit is contained in:
mertalev
2024-12-18 15:27:31 -05:00
parent 007caa26bd
commit 38a82d39d3
48 changed files with 2702 additions and 3164 deletions
+4 -10
View File
@@ -261,7 +261,7 @@ export class PersonService extends BaseService {
return force === false
? this.assetRepository.getWithout(pagination, WithoutProperty.FACES)
: this.assetRepository.getAll(pagination, {
orderDirection: 'DESC',
orderDirection: 'desc',
withFaces: true,
withArchived: true,
isVisible: true,
@@ -288,13 +288,7 @@ export class PersonService extends BaseService {
return JobStatus.SKIPPED;
}
const relations = {
exifInfo: true,
faces: {
person: false,
},
files: true,
};
const relations = { exifInfo: true, faces: { person: false }, files: true };
const [asset] = await this.assetRepository.getByIds([id], relations);
const { previewFile } = getAssetFiles(asset.files);
if (!asset || !previewFile) {
@@ -491,7 +485,7 @@ export class PersonService extends BaseService {
return JobStatus.SKIPPED;
}
let personId = matches.find((match) => match.face.personId)?.face.personId;
let personId = matches.find((match) => match.personId)?.personId;
if (!personId) {
const matchWithPerson = await this.searchRepository.searchFaces({
userIds: [face.asset.ownerId],
@@ -502,7 +496,7 @@ export class PersonService extends BaseService {
});
if (matchWithPerson.length > 0) {
personId = matchWithPerson[0].face.personId;
personId = matchWithPerson[0].personId;
}
}