From 114b52d0e96c801a5aa777870a8e1b98bc8d2374 Mon Sep 17 00:00:00 2001 From: Ming Ming Date: Fri, 22 Nov 2024 00:26:33 +0800 Subject: [PATCH] Revert "Fix wrong mime types used when counting file w/o metadata" This reverts commit 97f1b25ae9788d1d45f224f269fccebd0da9e188. --- app/lib/controller/metadata_controller.dart | 2 +- app/lib/entity/file_util.dart | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/lib/controller/metadata_controller.dart b/app/lib/controller/metadata_controller.dart index 097c64ea..581461a8 100644 --- a/app/lib/controller/metadata_controller.dart +++ b/app/lib/controller/metadata_controller.dart @@ -67,7 +67,7 @@ class MetadataController { try { final missingCount = await _c.npDb.countFilesByMissingMetadata( account: account.toDb(), - mimes: file_util.metadataSupportedFormatMimes, + mimes: file_util.supportedImageFormatMimes, ownerId: account.userId.toCaseInsensitiveString(), ); _log.info("[_startMetadataTask] Missing count: $missingCount"); diff --git a/app/lib/entity/file_util.dart b/app/lib/entity/file_util.dart index 940477a6..2eb5453c 100644 --- a/app/lib/entity/file_util.dart +++ b/app/lib/entity/file_util.dart @@ -27,7 +27,7 @@ bool isSupportedVideoFormat(FileDescriptor file) => isSupportedVideoMime(file.fdMime ?? ""); bool isMetadataSupportedMime(String mime) => - metadataSupportedFormatMimes.contains(mime); + _metadataSupportedFormatMimes.contains(mime); bool isMetadataSupportedFormat(FileDescriptor file) => isMetadataSupportedMime(file.fdMime ?? ""); @@ -138,7 +138,7 @@ final supportedImageFormatMimes = final supportedVideoFormatMimes = supportedFormatMimes.where((f) => f.startsWith("video/")).toList(); -const metadataSupportedFormatMimes = [ +const _metadataSupportedFormatMimes = [ "image/jpeg", "image/heic", ];