Skip to content

Commit

Permalink
resolve comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mruac committed Sep 22, 2023
1 parent 7a9bfa1 commit ae13866
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bridges/PatreonBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function collectData()
$thumbnail = $post->attributes->thumbnail->large ?? null;
$thumbnail = $thumbnail ?? $post->attributes->thumbnail->url ?? null;
$thumbnail = $thumbnail ?? $post->attributes->image->thumb_url ?? null;
$thumbnail = $thumbnail ?? $post->attributes->image->url;
$thumbnail = $thumbnail ?? $post->attributes->image->url ?? null;
$audio_filename = $audio->file_name ?? $item['title'];
$download_url = $audio->download_url ?? $item['uri'];
$item['content'] .= "<p><a href\"{$download_url}\"><img src=\"{$thumbnail}\"><br/>🎧 {$audio_filename}</a><br/>";
Expand All @@ -150,25 +150,25 @@ public function collectData()
$thumbnail = $post->attributes->thumbnail->large ?? null;
$thumbnail = $thumbnail ?? $post->attributes->thumbnail->url ?? null;
$thumbnail = $thumbnail ?? $post->attributes->image->thumb_url ?? null;
$thumbnail = $thumbnail ?? $post->attributes->image->url;
$thumbnail = $thumbnail ?? $post->attributes->image->url ?? null;
$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 ?? null;
$thumbnail = $thumbnail ?? $post->attributes->thumbnail->url ?? null;
$thumbnail = $thumbnail ?? $post->attributes->image->thumb_url ?? null;
$thumbnail = $thumbnail ?? $post->attributes->image->url;
$thumbnail = $thumbnail ?? $post->attributes->image->url ?? null;
$item['content'] .= "<p><a href=\"{$item['uri']}\">🎬 {$item['title']}<br><img src=\"{$thumbnail}\"></a></p>";
break;

case 'image_file':
$item['content'] .= '<p>';
foreach ($post->relationships->images->data as $key => $image) {
$image = $this->findInclude($posts, 'media', $image->id)->attributes;
$image_fullres = $image->download_url ?? $image->image_urls->url ?? $image->image_urls->original;
$image_fullres = $image->download_url ?? $image->image_urls->url ?? $image->image_urls->original ?? null;
$filename = $image->file_name ?? '';
$image_url = $image->image_urls->url ?? $image->image_urls->original;
$image_url = $image->image_urls->url ?? $image->image_urls->original ?? null;
$item['enclosures'][] = $image_fullres;
$item['content'] .= "<a href=\"{$image_fullres}\">{$filename}<br/><img src=\"{$image_url}\"></a><br/><br/>";
}
Expand Down

0 comments on commit ae13866

Please sign in to comment.