π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fix: if fileSize is null for manual way then skip 10MB check
Prateek Sunalfa7ccbd180a0
diff --git a/mobile/apps/photos/lib/services/video_preview_service.dart b/mobile/apps/photos/lib/services/video_preview_service.dartindex 929df89ae3..49f47f4e81 100644--- a/mobile/apps/photos/lib/services/video_preview_service.dart+++ b/mobile/apps/photos/lib/services/video_preview_service.dart@@ -299,7 +299,8 @@ class VideoPreviewService {"Starting video preview generation for ${enteFile.displayName}",);// elimination case for <=10 MB with H.264- var (props, result, file) = await _checkFileForPreviewCreation(enteFile, isManual);+ var (props, result, file) =+ await _checkFileForPreviewCreation(enteFile, isManual);if (result) {removeFile = true;return;@@ -929,21 +930,28 @@ class VideoPreviewService {_logger.info("Skip Preview due to sv=1 for ${enteFile.displayName}");return (null, true, null);}- if (enteFile.fileSize == null || enteFile.duration == null) {- _logger.warning(- "Skip Preview due to misisng size/duration for ${enteFile.displayName}",- );- return (null, true, null);- }- final int size = enteFile.fileSize!;- final int duration = enteFile.duration!;- if (!isManual && (size >= 500 * 1024 * 1024 || duration > 60)) {- _logger.info("Skip Preview due to size: $size or duration: $duration");- return (null, true, null);+ if (!isManual) {+ if (enteFile.fileSize == null || enteFile.duration == null) {+ _logger.warning(+ "Skip Preview due to misisng size/duration for ${enteFile.displayName}",+ );+ 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;+ if (enteFile.fileSize == null && isManual) {+ return (props, skipFile, file);+ }++ final size = enteFile.fileSize ?? 0;try {final isFileUnder10MB = size <= 10 * 1024 * 1024;if (isFileUnder10MB) {