瀏覽代碼

Merge pull request #1677 from pauloconstanca/patch-2

Fix Ombi Missing Image for TVShow Posters that do not come with Full URL
causefx 4 年之前
父節點
當前提交
7ee355aba8
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      api/homepage/ombi.php

+ 2 - 2
api/homepage/ombi.php

@@ -303,7 +303,7 @@ trait OmbiHomepageItem
 									'id' => $value['tvDbId'],
 									'title' => $value['title'],
 									'overview' => $value['overview'],
-									'poster' => (isset($value['posterPath']) && $value['posterPath'] !== '') ? $value['posterPath'] : 'plugins/images/cache/no-list.png',
+									'poster' => (isset($value['posterPath']) && $value['posterPath'] !== '') ? (str_starts_with($value['posterPath'], '/') ? 'https://image.tmdb.org/t/p/w300/' . $value['posterPath'] : $value['posterPath']) : 'plugins/images/cache/no-list.png',
 									'background' => (isset($value['background']) && $value['background'] !== '') ? 'https://image.tmdb.org/t/p/w1280/' . $value['background'] : '',
 									'approved' => $value['childRequests'][0]['approved'],
 									'available' => $value['childRequests'][0]['available'],
@@ -545,4 +545,4 @@ trait OmbiHomepageItem
 	{
 		return $type == $this->config['ombiTvDefault'];
 	}
-}
+}