Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Minor cleanup

laurenspriem1e9a014ce76f
diff --git a/mobile/lib/services/machine_learning/ml_service.dart b/mobile/lib/services/machine_learning/ml_service.dart
index 616e2bb2a1..0fee0af261 100644
--- a/mobile/lib/services/machine_learning/ml_service.dart
+++ b/mobile/lib/services/machine_learning/ml_service.dart
@@ -470,33 +470,17 @@ class MLService {
_logger.info("Results for file ${result.fileId} stored locally");
return actuallyRanML;
} catch (e, s) {
- bool acceptedIssue = false;
final String errorString = e.toString();
- if (errorString.contains('ThumbnailRetrievalException')) {
- _logger.severe(
- 'ThumbnailRetrievalException while processing image with ID ${instruction.file.uploadedFileID}, storing empty results so indexing does not get stuck',
- e,
- s,
- );
- acceptedIssue = true;
- }
- if (errorString.contains('InvalidImageFormatException')) {
- _logger.severe(
- '$errorString with ID ${instruction.file.uploadedFileID}, storing empty results so indexing does not get stuck',
- e,
- s,
- );
- acceptedIssue = true;
- }
- if (errorString.contains('FileSizeTooLargeForMobileIndexing')) {
+ final bool acceptedIssue =
+ errorString.contains('ThumbnailRetrievalException') ||
+ errorString.contains('InvalidImageFormatException') ||
+ errorString.contains('FileSizeTooLargeForMobileIndexing');
+ if (acceptedIssue) {
_logger.severe(
'$errorString with ID ${instruction.file.uploadedFileID}, storing empty results so indexing does not get stuck',
e,
s,
);
- acceptedIssue = true;
- }
- if (acceptedIssue) {
await MLDataDB.instance.bulkInsertFaces(
[Face.empty(instruction.file.uploadedFileID!, error: true)],
);