Skip to content

Commit 303941e

Browse files
committed
Only swap in a thumbnail for videos if a thumbnail is successfully returned
Signed-off-by: Andrew Welch <andrew@nystudio107.com>
1 parent 50e969c commit 303941e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Transcoder.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ function (AssetThumbEvent $event) {
156156
/** @var Asset $asset */
157157
$asset = $event->asset;
158158
if (AssetsHelper::getFileKindByExtension($asset->filename) === Asset::KIND_VIDEO) {
159-
$event->path = Transcoder::$plugin->transcode->handleGetAssetThumbPath($event);
159+
$path = Transcoder::$plugin->transcode->handleGetAssetThumbPath($event);
160+
if (!empty($path)) {
161+
$event->path = $path;
162+
}
160163
}
161164
}
162165
);

0 commit comments

Comments
 (0)