mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update VideoThumbnail job, generate blurhash for videos
This commit is contained in:
parent
38a37c15af
commit
896452c74c
1 changed files with 7 additions and 0 deletions
|
@ -13,6 +13,7 @@ use FFMpeg;
|
||||||
use Storage;
|
use Storage;
|
||||||
use App\Media;
|
use App\Media;
|
||||||
use App\Jobs\MediaPipeline\MediaStoragePipeline;
|
use App\Jobs\MediaPipeline\MediaStoragePipeline;
|
||||||
|
use App\Util\Media\Blurhash;
|
||||||
|
|
||||||
class VideoThumbnail implements ShouldQueue
|
class VideoThumbnail implements ShouldQueue
|
||||||
{
|
{
|
||||||
|
@ -59,6 +60,12 @@ class VideoThumbnail implements ShouldQueue
|
||||||
$media->thumbnail_path = $save;
|
$media->thumbnail_path = $save;
|
||||||
$media->save();
|
$media->save();
|
||||||
|
|
||||||
|
$blurhash = Blurhash::generate($media);
|
||||||
|
if($blurhash) {
|
||||||
|
$media->blurhash = $blurhash;
|
||||||
|
$media->save();
|
||||||
|
}
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue