From 57ac433c464b285a5b1bb8912daafd8bb6ab1bd5 Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Thu, 3 Jun 2021 22:44:41 +0200 Subject: [PATCH] Loading faces even if override keywords are disabled. fixes #293 --- src/backend/model/threading/MetadataLoader.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/backend/model/threading/MetadataLoader.ts b/src/backend/model/threading/MetadataLoader.ts index c4208cb4..76fdf253 100644 --- a/src/backend/model/threading/MetadataLoader.ts +++ b/src/backend/model/threading/MetadataLoader.ts @@ -295,15 +295,17 @@ export class MetadataLoader { faces.push({name, box}); } } - if (Config.Client.Faces.keywordsToPersons && faces.length > 0) { + if (faces.length > 0) { metadata.faces = faces; // save faces - // remove faces from keywords - metadata.faces.forEach(f => { - const index = metadata.keywords.indexOf(f.name); - if (index !== -1) { - metadata.keywords.splice(index, 1); - } - }); + if (Config.Client.Faces.keywordsToPersons) { + // remove faces from keywords + metadata.faces.forEach(f => { + const index = metadata.keywords.indexOf(f.name); + if (index !== -1) { + metadata.keywords.splice(index, 1); + } + }); + } } } } catch (err) {