mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-13 03:27:45 +02:00
fix(media): init file properties in setAttributes' Model method + set defaults to pathinfo data
This commit is contained in:
parent
26a714d9c2
commit
0775add678
6 changed files with 28 additions and 36 deletions
|
|
@ -21,11 +21,11 @@ class Transcript extends BaseMedia
|
|||
|
||||
protected string $type = 'transcript';
|
||||
|
||||
public function __construct(?array $data = null)
|
||||
public function initFileProperties(): void
|
||||
{
|
||||
parent::__construct($data);
|
||||
parent::initFileProperties();
|
||||
|
||||
if ($this->file_key && $this->file_metadata && array_key_exists('json_key', $this->file_metadata)) {
|
||||
if ($this->file_metadata !== null && array_key_exists('json_key', $this->file_metadata)) {
|
||||
helper('media');
|
||||
|
||||
$this->json_key = $this->file_metadata['json_key'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue