mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 08:46:18 +01:00
Fix wrong mime types used when counting file w/o metadata
This commit is contained in:
parent
4eab807524
commit
97f1b25ae9
2 changed files with 3 additions and 3 deletions
|
@ -67,7 +67,7 @@ class MetadataController {
|
||||||
try {
|
try {
|
||||||
final missingCount = await _c.npDb.countFilesByMissingMetadata(
|
final missingCount = await _c.npDb.countFilesByMissingMetadata(
|
||||||
account: account.toDb(),
|
account: account.toDb(),
|
||||||
mimes: file_util.supportedImageFormatMimes,
|
mimes: file_util.metadataSupportedFormatMimes,
|
||||||
ownerId: account.userId.toCaseInsensitiveString(),
|
ownerId: account.userId.toCaseInsensitiveString(),
|
||||||
);
|
);
|
||||||
_log.info("[_startMetadataTask] Missing count: $missingCount");
|
_log.info("[_startMetadataTask] Missing count: $missingCount");
|
||||||
|
|
|
@ -27,7 +27,7 @@ bool isSupportedVideoFormat(FileDescriptor file) =>
|
||||||
isSupportedVideoMime(file.fdMime ?? "");
|
isSupportedVideoMime(file.fdMime ?? "");
|
||||||
|
|
||||||
bool isMetadataSupportedMime(String mime) =>
|
bool isMetadataSupportedMime(String mime) =>
|
||||||
_metadataSupportedFormatMimes.contains(mime);
|
metadataSupportedFormatMimes.contains(mime);
|
||||||
|
|
||||||
bool isMetadataSupportedFormat(FileDescriptor file) =>
|
bool isMetadataSupportedFormat(FileDescriptor file) =>
|
||||||
isMetadataSupportedMime(file.fdMime ?? "");
|
isMetadataSupportedMime(file.fdMime ?? "");
|
||||||
|
@ -138,7 +138,7 @@ final supportedImageFormatMimes =
|
||||||
final supportedVideoFormatMimes =
|
final supportedVideoFormatMimes =
|
||||||
supportedFormatMimes.where((f) => f.startsWith("video/")).toList();
|
supportedFormatMimes.where((f) => f.startsWith("video/")).toList();
|
||||||
|
|
||||||
const _metadataSupportedFormatMimes = [
|
const metadataSupportedFormatMimes = [
|
||||||
"image/jpeg",
|
"image/jpeg",
|
||||||
"image/heic",
|
"image/heic",
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue