Skip to content

Commit

Permalink
fix: add tagging fix (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
glennmichael123 authored May 21, 2021
1 parent 2884ad2 commit cf95c5d
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions src/Jobs/CreateVideoConversion.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class CreateVideoConversion implements ShouldQueue
private array $jobSettings;

/**
* @var int
* @var array
*/
private int $mediaId;
private int $metaData;

/**
* @var array
Expand All @@ -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;
}
}

/**
Expand All @@ -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);
}
}

0 comments on commit cf95c5d

Please sign in to comment.