Leite Vorschaubilder und Filmstufen geschuetzt ab
Deploy Test / test (push) Successful in 2m28s
Deploy Test / deploy (push) Failing after 14s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-11-16 09:40:59 +01:00
1 parent d6ff881e4e
commit c997eb500c
32 files changed
+979 -68

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
<?php
namespace App\Jobs;
use App\Domain\Catalog\Composition;
use App\Domain\Catalog\ContentElement;
use App\Domain\Media\ThumbnailDeriver;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Queue\Queueable;
class DeriveThumbnail implements ShouldQueue
{
use Queueable;
public function __construct(
public readonly string $subject,
public readonly int $subjectId,
public readonly ?string $incoming = null,
) {}
public function handle(ThumbnailDeriver $deriver): void
{
if ($this->subject === 'komposition') {
$composition = Composition::query()->find($this->subjectId);
if ($composition !== null && is_string($this->incoming)) {
$deriver->forCompositionUpload($composition, $this->incoming);
}
return;
}
$element = ContentElement::query()->find($this->subjectId);
if ($element !== null) {
$deriver->forElement($element);
}
}
}