Skip to content

armgit / ente

Public Imported from GitHub
0

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

Merge upstream main into ML cache cleanup

ashil-pilot7021ea6f6b61
diff --cc mobile/apps/photos/lib/module/download/file.dart
index 8b8326db63,e7d026efb2..54d51c8b75
--- a/mobile/apps/photos/lib/module/download/file.dart
+++ b/mobile/apps/photos/lib/module/download/file.dart
@@@ -423,17 -303,12 +314,8 @@@ String getExtension(String nameOrPath)
return fileExtension;
}
- Future<Uint8List> compressThumbnail(Uint8List thumbnail) {
- return FlutterImageCompress.compressWithList(
- thumbnail,
- minHeight: compressedThumbnailResolution,
- minWidth: compressedThumbnailResolution,
- quality: 25,
- );
- }
-
Future<void> clearCache(EnteFile file) async {
- if (file.fileType == FileType.video) {
- await VideoCacheManager.instance.removeFile(file.downloadUrl);
- } else {
- await DefaultCacheManager().removeFile(file.downloadUrl);
- }
+ await removeFromDownloadCache(file);
final cachedThumbnail = File(
Configuration.instance.getThumbnailCacheDirectory() +
"/" +
diff --cc mobile/apps/photos/lib/services/machine_learning/ml_service.dart
index be47d52758,dd2c119fbb..81dfafb562
--- a/mobile/apps/photos/lib/services/machine_learning/ml_service.dart
+++ b/mobile/apps/photos/lib/services/machine_learning/ml_service.dart
@@@ -19,6 -19,6 +19,7 @@@ import "package:photos/models/file/file
import "package:photos/models/ml/clip.dart";
import "package:photos/models/ml/face/face.dart";
import "package:photos/models/ml/ml_versions.dart";
++import "package:photos/module/download/file.dart";
import "package:photos/service_locator.dart";
import "package:photos/services/filedata/model/file_data.dart";
import "package:photos/services/machine_learning/face_ml/face_clustering/face_clustering_service.dart";