High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix(server): search with same face multiple times (#7306)
Michel Heusschen173b47033a8d
diff --git a/server/src/infra/infra.utils.ts b/server/src/infra/infra.utils.tsindex 1538958e0f..745f5a38ff 100644--- a/server/src/infra/infra.utils.ts+++ b/server/src/infra/infra.utils.ts@@ -213,9 +213,9 @@ export function searchAssetBuilder(if (personIds && personIds.length > 0) {builder.leftJoin(`${builder.alias}.faces`, 'faces')- .andWhere('faces.personId IN (:...personIds)', { personIds: personIds })+ .andWhere('faces.personId IN (:...personIds)', { personIds }).addGroupBy(`${builder.alias}.id`)- .having('COUNT(faces.id) = :personCount', { personCount: personIds.length });+ .having('COUNT(DISTINCT faces.personId) = :personCount', { personCount: personIds.length });if (withExif) {builder.addGroupBy('exifInfo.assetId');