mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-03-14 20:21:14 +03:00
[YoutubeBridge] Set icon (#3416)
This commit is contained in:
parent
845a8f7936
commit
c5cd229445
1 changed files with 10 additions and 0 deletions
|
@ -336,6 +336,7 @@ class YoutubeBridge extends BridgeAbstract
|
|||
$html = $this->ytGetSimpleHTMLDOM($url_listing);
|
||||
$jsonData = $this->getJSONData($html);
|
||||
$url_feed = $jsonData->metadata->channelMetadataRenderer->rssUrl;
|
||||
$this->iconURL = $jsonData->metadata->channelMetadataRenderer->avatar->thumbnails[0]->url;
|
||||
}
|
||||
if (!$this->skipFeeds()) {
|
||||
$html = $this->ytGetSimpleHTMLDOM($url_feed);
|
||||
|
@ -444,4 +445,13 @@ class YoutubeBridge extends BridgeAbstract
|
|||
return parent::getName();
|
||||
}
|
||||
}
|
||||
|
||||
public function getIcon()
|
||||
{
|
||||
if (empty($this->iconURL)) {
|
||||
return parent::getIcon();
|
||||
} else {
|
||||
return $this->iconURL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue