Only check images for preview

old-stable24
Varun Patil 2022-10-25 10:25:26 -07:00
parent 5cd9bc920a
commit 27e40ecfdd
1 changed files with 5 additions and 5 deletions

View File

@ -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();