Skip to content

armgit / ente

Public Imported from GitHub
0

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

Avoid mixing upload with preview generation to save cpu

Neeraj Guptafa0c70d6332a
diff --git a/mobile/lib/utils/file_uploader.dart b/mobile/lib/utils/file_uploader.dart
index 14e4361798..cb7a09db9d 100644
--- a/mobile/lib/utils/file_uploader.dart
+++ b/mobile/lib/utils/file_uploader.dart
@@ -36,7 +36,6 @@ import "package:photos/module/upload/service/multipart.dart";
import "package:photos/service_locator.dart";
import "package:photos/services/account/user_service.dart";
import 'package:photos/services/collections_service.dart';
-import "package:photos/services/preview_video_store.dart";
import 'package:photos/services/sync/local_sync_service.dart';
import 'package:photos/services/sync/sync_service.dart';
import "package:photos/utils/exif_util.dart";
@@ -99,8 +98,6 @@ class FileUploader {
static FileUploader instance = FileUploader._privateConstructor();
- static final _previewVideoStore = PreviewVideoStore.instance;
-
Future<void> init(SharedPreferences preferences, bool isBackground) async {
_prefs = preferences;
_processType =
@@ -472,14 +469,6 @@ class FileUploader {
}
}
- void _uploadPreview(EnteFile file) {
- if (file.fileType == FileType.video) {
- unawaited(
- _previewVideoStore.chunkAndUploadVideo(null, file),
- );
- }
- }
-
Future<EnteFile> _tryToUpload(
EnteFile file,
int collectionID,
@@ -814,9 +803,6 @@ class FileUploader {
}
await FilesDB.instance.update(remoteFile);
}
- if (PreviewVideoStore.instance.isVideoStreamingEnabled) {
- _uploadPreview(file);
- }
await UploadLocksDB.instance.deleteMultipartTrack(lockKey);
Bus.instance.fire(