From cf95c5d7d233e8c1202ec04df64e2aee33438c80 Mon Sep 17 00:00:00 2001 From: Glenn Michael Torregosa Date: Fri, 21 May 2021 08:19:33 +0800 Subject: [PATCH] fix: add tagging fix (#19) --- src/Jobs/CreateVideoConversion.php | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/src/Jobs/CreateVideoConversion.php b/src/Jobs/CreateVideoConversion.php index 8cc2d03..0de0787 100644 --- a/src/Jobs/CreateVideoConversion.php +++ b/src/Jobs/CreateVideoConversion.php @@ -19,9 +19,9 @@ class CreateVideoConversion implements ShouldQueue private array $jobSettings; /** - * @var int + * @var array */ - private int $mediaId; + private int $metaData; /** * @var array @@ -31,18 +31,15 @@ class CreateVideoConversion implements ShouldQueue /** * Create a new job instance. * - * @param $jobSettings - * @param $tags - * @param $mediaId + * @param array $jobSettings + * @param array $metadata + * @param array $tags */ - public function __construct($jobSettings, $tags, $mediaId = null) + public function __construct($jobSettings, $metaData = [], $tags = []) { $this->jobSettings = $jobSettings; + $this->metaData = $metaData; $this->tags = $tags; - - if ($mediaId) { - $this->mediaId = $mediaId; - } } /** @@ -52,13 +49,6 @@ public function __construct($jobSettings, $tags, $mediaId = null) */ public function handle() { - $metaData = []; - $tags = $this->tags; - - if ($this->mediaId) { - $metaData = ['model_id' => $this->mediaId]; - } - - MediaConvert::createJob($this->jobSettings, $metaData, $tags); + MediaConvert::createJob($this->jobSettings, $this->metaData, $this->tags); } }