Skip to content

armgit / ente

Public Imported from GitHub
0

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

Revert "fix: remove the limit for size and duration"

Prateek Sunalaa45fe898a97
diff --git a/mobile/lib/services/video_preview_service.dart b/mobile/lib/services/video_preview_service.dart
index ac71e92a5a..aa18483942 100644
--- a/mobile/lib/services/video_preview_service.dart
+++ b/mobile/lib/services/video_preview_service.dart
@@ -731,10 +731,16 @@ class VideoPreviewService {
return (null, true, null);
}
final int size = enteFile.fileSize!;
+ final int duration = enteFile.duration!;
+ if (size >= 500 * 1024 * 1024 || duration > 60) {
+ _logger.info(
+ "Skip Preview due to size: $size or duration: $duration",
+ );
+ return (null, true, null);
+ }
FFProbeProps? props;
File? file;
bool skipFile = false;
-
try {
final isFileUnder10MB = size <= 10 * 1024 * 1024;
if (isFileUnder10MB) {