return false to exit event, imgPath holds the path
This commit is contained in:
parent
13e1f0a561
commit
d230d332cf
|
@ -58,8 +58,9 @@ class VideoThumbnailsPlugin extends Plugin
|
||||||
try {
|
try {
|
||||||
// Exception thrown if no thumbnail found
|
// Exception thrown if no thumbnail found
|
||||||
$thumb = File_thumbnail::byFile($file, false);
|
$thumb = File_thumbnail::byFile($file, false);
|
||||||
// If getPath doesn't throw an exception, we have a working locally stored thumbnail
|
$imgPath = $thumb->getPath();
|
||||||
return $thumb->getPath();
|
// If getPath didn't throw an exception, we have a working locally stored thumbnail
|
||||||
|
return false;
|
||||||
} catch (NoResultException $e) {
|
} catch (NoResultException $e) {
|
||||||
// Alright, no thumbnail found, so let's create one.
|
// Alright, no thumbnail found, so let's create one.
|
||||||
} catch (InvalidFilenameException $e) {
|
} catch (InvalidFilenameException $e) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user