Fix reset_postprocessing.php script

This commit is contained in:
DariusIII
2018-03-05 13:21:59 +01:00
parent d40425bf5a
commit 220a81f61c
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -1,4 +1,5 @@
2018-03-05 DariusIII
* Fix: Fix reset_postprocessing.php script
* Fix: Fix TV shows lookups
* Chg: Add irc server setting to env.example file
* Chg: Update ssl and irc settings handling
+2 -2
View File
@@ -11,7 +11,7 @@ $pdo = new DB();
$consoletools = new ConsoleTools();
$ran = false;
if (isset($argv[1], $argv[2]) && $argv[1] === 'all' && $argv[2] === 'true') {
if ($argv[1] !== null && $argv[1] === 'all' && $argv[2] !== null && $argv[2] === 'true') {
$ran = true;
$where = '';
if (isset($argv[3]) && $argv[3] === 'truncate') {
@@ -200,7 +200,7 @@ if (isset($argv[1]) && ($argv[1] === 'tv' || $argv[1] === 'all')) {
$where = ' WHERE videos_id != 0 AND tv_episodes_id != 0 AND categories_id BETWEEN '.Category::TV_ROOT.' AND '.Category::TV_OTHER;
} else {
echo ColorCLI::header('Resetting all failed TV postprocessing');
$where = ' WHERE tv_episodes_id < 0 AND categories_id BETWEEN '.Category::GAME_ROOT.' AND '.Category::GAME_OTHER;
$where = ' WHERE tv_episodes_id < 0 AND categories_id BETWEEN '.Category::TV_ROOT.' AND '.Category::TV_OTHER;
}
$qry = $pdo->queryDirect('SELECT id FROM releases'.$where);