From 307f5865c0bd12c32e7c5bdc0869dd0dcd403e40 Mon Sep 17 00:00:00 2001 From: realansgar Date: Tue, 21 Mar 2023 18:24:28 +0100 Subject: [PATCH] [ARDAudiothekBridge] fix feed icon not showing in RSS feeds (#3274) * [ARDAudiothekBridge] fix feed icon not showing in RSS feeds * [ARDAudiothekBridge] Fix lint errors --- bridges/ARDAudiothekBridge.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bridges/ARDAudiothekBridge.php b/bridges/ARDAudiothekBridge.php index 3ec84d23..07a3cc68 100644 --- a/bridges/ARDAudiothekBridge.php +++ b/bridges/ARDAudiothekBridge.php @@ -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 = [ [ @@ -115,6 +120,9 @@ class ARDAudiothekBridge extends BridgeAbstract $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);