mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 16:38:50 +00:00
[UnogsBridge] Add fallback if not found any high-res image (#2301)
This commit is contained in:
parent
927b08ed00
commit
bdf15c3ce0
@ -113,9 +113,15 @@ class UnogsBridge extends BridgeAbstract {
|
|||||||
private function getImage($nfid) {
|
private function getImage($nfid) {
|
||||||
$url = self::URI . '/api/title/bgimages?netflixid=' . $nfid;
|
$url = self::URI . '/api/title/bgimages?netflixid=' . $nfid;
|
||||||
$json = $this->getJSON($url);
|
$json = $this->getJSON($url);
|
||||||
end($json['bo1280x448']);
|
$image_wrapper = '';
|
||||||
$position = key($json['bo1280x448']);
|
if(isset($json['bo1280x448'])) {
|
||||||
$image_link = $json['bo1280x448'][$position]['url'];
|
$image_wrapper = 'bo1280x448';
|
||||||
|
} else {
|
||||||
|
$image_wrapper = 'bo665x375';
|
||||||
|
}
|
||||||
|
end($json[$image_wrapper]);
|
||||||
|
$position = key($json[$image_wrapper]);
|
||||||
|
$image_link = $json[$image_wrapper][$position]['url'];
|
||||||
return $image_link;
|
return $image_link;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user