Only check images for preview
parent
02becf6766
commit
58e3b87cc4
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue