Fasse die Bearbeitung in Dialoge und übernimm eine Filmstelle als Titelbild.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
9195cdcd15
commit
c47c3b9b32
9 files changed
+1052
-228
No files matched your search
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
use App\Domain\Catalog\Composition;
|
||||
use App\Domain\Catalog\ContentElementVersion;
|
||||
use App\Domain\Media\ThumbnailDeriver;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Queue\Queueable;
|
||||
|
||||
class DeriveCompositionFrame implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
public function __construct(
|
||||
public readonly int $compositionId,
|
||||
public readonly int $versionId,
|
||||
public readonly float $atSecond,
|
||||
) {}
|
||||
|
||||
public function handle(ThumbnailDeriver $deriver): void
|
||||
{
|
||||
$composition = Composition::query()->find($this->compositionId);
|
||||
$version = ContentElementVersion::query()->find($this->versionId);
|
||||
|
||||
if (! $composition instanceof Composition || ! $version instanceof ContentElementVersion) {
|
||||
return;
|
||||
}
|
||||
|
||||
$deriver->forCompositionFrame($composition, $version, $this->atSecond);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user