mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-31 13:50:23 +02:00
[FeedExpander.php] Preserve original icon (#2145)
This commit is contained in:
@@ -57,6 +57,12 @@ abstract class FeedExpander extends BridgeAbstract {
|
||||
*/
|
||||
private $uri;
|
||||
|
||||
/**
|
||||
* Holds the icon of the feed
|
||||
*
|
||||
*/
|
||||
private $icon;
|
||||
|
||||
/**
|
||||
* Holds the feed type during internal operations.
|
||||
*
|
||||
@@ -216,6 +222,10 @@ abstract class FeedExpander extends BridgeAbstract {
|
||||
protected function load_RSS_2_0_feed_data($rssContent){
|
||||
$this->title = trim((string)$rssContent->title);
|
||||
$this->uri = trim((string)$rssContent->link);
|
||||
|
||||
if (!empty($rssContent->image)) {
|
||||
$this->icon = trim((string)$rssContent->image->url);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -241,6 +251,12 @@ abstract class FeedExpander extends BridgeAbstract {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($content->icon)) {
|
||||
$this->icon = (string)$content->icon;
|
||||
} elseif(!empty($content->logo)) {
|
||||
$this->icon = (string)$content->logo;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user