Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[ARDAudiothekBridge] fix feed icon not showing in RSS feeds (#3274)
* [ARDAudiothekBridge] fix feed icon not showing in RSS feeds

* [ARDAudiothekBridge] Fix lint errors
  • Loading branch information
realansgar committed Mar 21, 2023
1 parent 36e98e8 commit 307f586
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bridges/ARDAudiothekBridge.php
Expand Up @@ -22,6 +22,11 @@ class ARDAudiothekBridge extends BridgeAbstract
* @const IMAGEWIDTHPLACEHOLDER
*/
const IMAGEWIDTHPLACEHOLDER = '{width}';
/*
* File extension appended to image link in $this->icon
* @const IMAGEEXTENSION
*/
const IMAGEEXTENSION = '.jpg';

const PARAMETERS = [
[
Expand Down Expand Up @@ -115,6 +120,9 @@ public function collectData()
$this->title = $processedJSON->title;
$this->uri = $processedJSON->sharingUrl;
$this->icon = str_replace(self::IMAGEWIDTHPLACEHOLDER, self::IMAGEWIDTH, $processedJSON->image->url1X1);
// add image file extension to URL so icon is shown in generated RSS feeds, see
// https://github.com/RSS-Bridge/rss-bridge/blob/4aed05c7b678b5673386d61374bba13637d15487/formats/MrssFormat.php#L76
$this->icon = $this->icon . self::IMAGEEXTENSION;

$this->items = array_slice($this->items, 0, $limit);

Expand Down

0 comments on commit 307f586

Please sign in to comment.