From 896452c74c2f06dba83ccb1dc90f78a21566b27a Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 30 Jan 2021 17:30:04 -0700 Subject: [PATCH] Update VideoThumbnail job, generate blurhash for videos --- app/Jobs/VideoPipeline/VideoThumbnail.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/Jobs/VideoPipeline/VideoThumbnail.php b/app/Jobs/VideoPipeline/VideoThumbnail.php index dc4e00b4d..8df8ec75c 100644 --- a/app/Jobs/VideoPipeline/VideoThumbnail.php +++ b/app/Jobs/VideoPipeline/VideoThumbnail.php @@ -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) { }