Only check images for preview

old-stable24
Varun Patil 2022-10-25 10:25:26 -07:00
parent 02becf6766
commit 58e3b87cc4
1 changed files with 5 additions and 5 deletions

View File

@ -31,6 +31,11 @@ class TimelineWrite
{ {
$mime = $file->getMimeType(); $mime = $file->getMimeType();
if (\in_array($mime, Application::IMAGE_MIMES, true)) { 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; return 1;
} }
if (\in_array($mime, Application::VIDEO_MIMES, true)) { if (\in_array($mime, Application::VIDEO_MIMES, true)) {
@ -61,11 +66,6 @@ class TimelineWrite
return 0; return 0;
} }
// Make sure preview generator supports the mime type
if (!$this->preview->isMimeSupported($file->getMimeType())) {
return 0;
}
// Get parameters // Get parameters
$mtime = $file->getMtime(); $mtime = $file->getMtime();
$fileId = $file->getId(); $fileId = $file->getId();