Update VideoThumbnail job, generate blurhash for videos

This commit is contained in:
Daniel Supernault 2021-01-30 17:30:04 -07:00
parent 38a37c15af
commit 896452c74c
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -13,6 +13,7 @@ use FFMpeg;
use Storage;
use App\Media;
use App\Jobs\MediaPipeline\MediaStoragePipeline;
use App\Util\Media\Blurhash;
class VideoThumbnail implements ShouldQueue
{
@ -59,6 +60,12 @@ class VideoThumbnail implements ShouldQueue
$media->thumbnail_path = $save;
$media->save();
$blurhash = Blurhash::generate($media);
if($blurhash) {
$media->blurhash = $blurhash;
$media->save();
}
} catch (Exception $e) {
}