Properly handle missing covers in check_covers script

This commit is contained in:
DariusIII
2017-05-12 10:32:31 +02:00
parent b30aff8593
commit 2bbcf53603
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -1,3 +1,5 @@
2017-05-12 DariusIII
* Chg: Properly handle missing covers in check_covers script
2017-05-11 DariusIII
* Chg: Shorten the interval to 5 hours for check_covers script from 2 days
* Fix: Properly declare pdo in Tmux class
+1 -1
View File
@@ -40,7 +40,7 @@ if (isset($argv[1]) && ($argv[1] === 'true' || $argv[1] === 'check')) {
echo ColorCLI::warning('Missing cover ' . $nzbpath);
if ($argv[1] === 'true') {
$cover = $movie->updateMovieInfo($row['imdbid']);
if($cover === false) {
if($cover === false || !file_exists($nzbpath)) {
$pdo->queryExec('UPDATE movieinfo m SET m.cover = 0 WHERE m.imdbid = %d', $row['imdbid']);
}
}