From 58e3b87cc456c7faa4044a3ffea129e57fa4e58e Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Tue, 25 Oct 2022 10:25:26 -0700 Subject: [PATCH] Only check images for preview --- lib/Db/TimelineWrite.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Db/TimelineWrite.php b/lib/Db/TimelineWrite.php index 5377ecdd..6e0226cf 100644 --- a/lib/Db/TimelineWrite.php +++ b/lib/Db/TimelineWrite.php @@ -31,6 +31,11 @@ class TimelineWrite { $mime = $file->getMimeType(); if (\in_array($mime, Application::IMAGE_MIMES, true)) { + // Make sure preview generator supports the mime type + if (!$this->preview->isMimeSupported($mime)) { + return 0; + } + return 1; } if (\in_array($mime, Application::VIDEO_MIMES, true)) { @@ -61,11 +66,6 @@ class TimelineWrite return 0; } - // Make sure preview generator supports the mime type - if (!$this->preview->isMimeSupported($file->getMimeType())) { - return 0; - } - // Get parameters $mtime = $file->getMtime(); $fileId = $file->getId();