Skip to content

Commit

Permalink
resolved github comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mruac committed Aug 31, 2023
1 parent 94f92a7 commit f9c7248
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bridges/PatreonBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ public function collectData()
$audio = $this->findInclude($posts, 'media', $id)->attributes ?? null;
}
}
$thumbnail = $post->attributes->thumbnail->large ?? $post->attributes->thumbnail->url;
$thumbnail = $post->attributes->thumbnail->large ?? null;
$thumbnail = $thumbnail ?? $post->attributes->thumbnail->url;
$thumbnail = $thumbnail ?? $post->attributes->image->thumb_url;
$thumbnail = $thumbnail ?? $post->attributes->image->url;
$audio_filename = $audio->file_name ?? $item['title'];
Expand All @@ -146,14 +147,16 @@ public function collectData()
break;

case 'video_embed':
$thumbnail = $post->attributes->thumbnail->large ?? $post->attributes->thumbnail->url;
$thumbnail = $post->attributes->thumbnail->large ?? null;
$thumbnail = $thumbnail ?? $post->attributes->thumbnail->url;
$thumbnail = $thumbnail ?? $post->attributes->image->thumb_url;
$thumbnail = $thumbnail ?? $post->attributes->image->url;
$item['content'] .= "<p><a href=\"{$item['uri']}\">🎬 {$item['title']}<br><img src=\"{$thumbnail}\"></a></p>";
break;

case 'video_external_file':
$thumbnail = $post->attributes->thumbnail->large ?? $post->attributes->thumbnail->url;
$thumbnail = $post->attributes->thumbnail->large ?? null;
$thumbnail = $thumbnail ?? $post->attributes->thumbnail->url;
$thumbnail = $thumbnail ?? $post->attributes->image->thumb_url;
$thumbnail = $thumbnail ?? $post->attributes->image->url;
$item['content'] .= "<p><a href=\"{$item['uri']}\">🎬 {$item['title']}<br><img src=\"{$thumbnail}\"></a></p>";
Expand Down

0 comments on commit f9c7248

Please sign in to comment.