improve cover view

This commit is contained in:
xiaomlove
2022-09-01 02:47:17 +08:00
parent 138ee2b86a
commit b29c944c33
2 changed files with 44 additions and 22 deletions

View File

@@ -3492,7 +3492,9 @@ foreach ($rows as $row)
$coverSrc = '';
if ($imdb_id = parse_imdb_id($row["url"])) {
try {
$coverSrc = $imdb->getMovie($imdb_id)->photo(false);
if ($imdb->getCacheStatus($imdb_id) == 1) {
$coverSrc = $imdb->getMovie($imdb_id)->photo(false);
}
} catch (\Exception $exception) {
do_log("torrent: {$row['id']} get cover from imdb error: ".$exception->getMessage() . "\n[stacktrace]\n" . $exception->getTraceAsString(), 'error');
}