From 2bbcf53603f1677147c859ef1c085fa001023c01 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Fri, 12 May 2017 10:32:31 +0200 Subject: [PATCH] Properly handle missing covers in check_covers script --- Changelog | 2 ++ misc/testing/PostProc/check_covers.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 996943628..aad42681e 100755 --- a/Changelog +++ b/Changelog @@ -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 diff --git a/misc/testing/PostProc/check_covers.php b/misc/testing/PostProc/check_covers.php index 382ebf58a..a1d4ed69b 100644 --- a/misc/testing/PostProc/check_covers.php +++ b/misc/testing/PostProc/check_covers.php @@ -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']); } }