Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Better logging for image retrieval

laurenspriem375260d701ce
diff --git a/mobile/lib/utils/ml_util.dart b/mobile/lib/utils/ml_util.dart
index 13fb1474c7..cb9ab5d630 100644
--- a/mobile/lib/utils/ml_util.dart
+++ b/mobile/lib/utils/ml_util.dart
@@ -299,7 +299,8 @@ Future<String> getImagePathForML(EnteFile enteFile) async {
final stopwatch = Stopwatch()..start();
File? file;
- if (enteFile.fileType == FileType.video) {
+ final bool isVideo = enteFile.fileType == FileType.video;
+ if (isVideo) {
try {
file = await getThumbnailForUploadedFile(enteFile);
} on PlatformException catch (e, s) {
@@ -328,8 +329,8 @@ Future<String> getImagePathForML(EnteFile enteFile) async {
);
if (imagePath == null) {
- _logger.warning(
- "Failed to get any data for enteFile with uploadedFileID ${enteFile.uploadedFileID} since its file path is null",
+ _logger.severe(
+ "Failed to get any data for enteFile with uploadedFileID ${enteFile.uploadedFileID} since its file path is null (isVideo: $isVideo)",
);
throw CouldNotRetrieveAnyFileData();
}