Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Only write pet dummy entry when pet inference ran but found nothing

Amrithesh Kakkoth Ente41c80e56c198
diff --git a/mobile/apps/photos/lib/services/machine_learning/ml_service.dart b/mobile/apps/photos/lib/services/machine_learning/ml_service.dart
index e7ff07bc48..56fc8b3cee 100644
--- a/mobile/apps/photos/lib/services/machine_learning/ml_service.dart
+++ b/mobile/apps/photos/lib/services/machine_learning/ml_service.dart
@@ -685,12 +685,10 @@ class MLService {
);
}
}
- if (instruction.shouldRunPets) {
- final hasPetFaces =
- result.petFaces != null && result.petFaces!.isNotEmpty;
- if (!hasPetFaces) {
- await mlDataDB.bulkInsertPetFaces([DBPetFace.empty(result.fileId)]);
- }
+ if (instruction.shouldRunPets &&
+ result.petFaces != null &&
+ result.petFaces!.isEmpty) {
+ await mlDataDB.bulkInsertPetFaces([DBPetFace.empty(result.fileId)]);
}
_logger.info("ML result for fileID ${result.fileId} stored remote+local");
return actuallyRanML;