Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Index videos using thumbnails

laurenspriem44898415e784
diff --git a/mobile/lib/services/machine_learning/face_ml/face_ml_service.dart b/mobile/lib/services/machine_learning/face_ml/face_ml_service.dart
index fbed736e8e..cbc5aab3a4 100644
--- a/mobile/lib/services/machine_learning/face_ml/face_ml_service.dart
+++ b/mobile/lib/services/machine_learning/face_ml/face_ml_service.dart
@@ -966,7 +966,12 @@ class FaceMlService {
switch (typeOfData) {
case FileDataForML.fileData:
final stopwatch = Stopwatch()..start();
- final File? file = await getFile(enteFile, isOrigin: true);
+ File? file;
+ if (enteFile.fileType == FileType.video) {
+ file = await getThumbnailForUploadedFile(enteFile);
+ } else {
+ file = await getFile(enteFile, isOrigin: true);
+ }
if (file == null) {
_logger.warning("Could not get file for $enteFile");
imagePath = null;
@@ -1294,10 +1299,6 @@ class FaceMlService {
if (!enteFile.isUploaded || enteFile.isOwner == false) {
return true;
}
- // Skip if the file is a video
- if (enteFile.fileType == FileType.video) {
- return true;
- }
// I don't know how motionPhotos and livePhotos work, so I'm also just skipping them for now
if (enteFile.fileType == FileType.other) {
return true;