mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-04 07:19:03 +02:00
fix(podcast-activity): check if transcript and chapters are set before including them in audio
This commit is contained in:
parent
0128a21ec5
commit
5855a25093
1 changed files with 8 additions and 2 deletions
|
|
@ -68,10 +68,16 @@ class PodcastEpisode extends ObjectType
|
|||
'type' => 'Link',
|
||||
'mediaType' => $episode->audio->file_mimetype,
|
||||
],
|
||||
'transcript' => $episode->transcript->file_url,
|
||||
'chapters' => $episode->chapters->file_url,
|
||||
];
|
||||
|
||||
if ($episode->transcript !== null) {
|
||||
$this->audio['transcript'] = $episode->transcript->file_url;
|
||||
}
|
||||
|
||||
if ($episode->chapters !== null) {
|
||||
$this->audio['chapters'] = $episode->chapters->file_url;
|
||||
}
|
||||
|
||||
$this->comments = url_to('episode-comments', $episode->podcast->handle, $episode->slug);
|
||||
|
||||
if ($episode->published_at !== null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue