metadata: use face recognition if recognize not available

pull/783/head
Varun Patil 2023-08-16 08:40:15 -07:00
parent ea11e8d984
commit 520d0c6b13
1 changed files with 8 additions and 4 deletions

View File

@ -352,10 +352,14 @@ export default defineComponent({
},
people(): IFace[] {
if (this.routeIsFaceRecognition)
return this.baseInfo?.clusters?.facerecognition ?? [];
else
return this.baseInfo?.clusters?.recognize ?? [];
const clusters = this.baseInfo?.clusters;
// force face-recognition on its own route, or if recognize is disabled
if (this.routeIsFaceRecognition || !this.config.recognize_enabled) {
return clusters?.facerecognition ?? [];
}
return clusters?.recognize ?? [];
},
},