se bootstrap/autoload.php instead the bootstrap.php in root of install

This commit is contained in:
DariusIII
2017-11-24 15:38:28 +01:00
parent 0df6c41be1
commit f46d3518ba
99 changed files with 726 additions and 667 deletions
+29 -26
View File
@@ -1,6 +1,6 @@
<?php
require_once dirname(__DIR__, 3).DIRECTORY_SEPARATOR.'bootstrap.php';
require_once dirname(__DIR__, 3).DIRECTORY_SEPARATOR.'bootstrap/autoload.php';
use nntmux\db\DB;
use nntmux\Category;
@@ -40,15 +40,16 @@ if (isset($argv[1], $argv[2]) && $argv[1] === 'all' && $argv[2] === 'true') {
$total = $qry->rowCount();
foreach ($qry as $releases) {
$pdo->queryExec(
sprintf('
sprintf(
'
UPDATE releases
SET consoleinfo_id = NULL, gamesinfo_id = 0, imdbid = NULL, musicinfo_id = NULL,
bookinfo_id = NULL, videos_id = 0, tv_episodes_id = 0, xxxinfo_id = 0, passwordstatus = -1, haspreview = -1,
jpgstatus = 0, videostatus = 0, audiostatus = 0, nfostatus = -1
WHERE id = %d',
$releases['id']
)
);
$releases['id']
)
);
$consoletools->overWritePrimary('Resetting Releases: '.$consoletools->percentString(++$affected, $total));
}
}
@@ -290,8 +291,10 @@ if (isset($argv[1]) && ($argv[1] === 'xxx' || $argv[1] === 'all')) {
$total = $qry->rowCount();
foreach ($qry as $releases) {
$pdo->queryExec('UPDATE releases SET xxxinfo_id = 0 WHERE id = '.$releases['id']);
$consoletools->overWritePrimary('Resetting XXX Releases: '.$consoletools->percentString(++$concount,
$total));
$consoletools->overWritePrimary('Resetting XXX Releases: '.$consoletools->percentString(
++$concount,
$total
));
}
}
echo ColorCLI::header(PHP_EOL.number_format($concount).' xxxinfo_IDs reset.');
@@ -323,25 +326,25 @@ if (isset($argv[1]) && ($argv[1] === 'nfos' || $argv[1] === 'all')) {
if ($ran === false) {
exit(
ColorCLI::error(
'\nThis script will reset postprocessing per category. It can also truncate the associated tables.'
.'\nTo reset only those that have previously failed, those without covers, samples, previews, etc. use the '
.'second argument false.\n'
.'To reset even those previously post processed, use the second argument true.\n'
.'To truncate the associated table, use the third argument truncate.\n\n'
.'php reset_postprocessing.php consoles true ...: To reset all consoles.\n'
.'php reset_postprocessing.php games true ...: To reset all games.\n'
.'php reset_postprocessing.php movies true ...: To reset all movies.\n'
.'php reset_postprocessing.php music true ...: To reset all music.\n'
.'php reset_postprocessing.php misc true ...: To reset all misc.\n'
.'php reset_postprocessing.php tv true ...: To reset all tv.\n'
.'php reset_postprocessing.php anime true ...: To reset all anime.\n'
.'php reset_postprocessing.php books true ...: To reset all books.\n'
.'php reset_postprocessing.php xxx true ...: To reset all xxx.\n'
.'php reset_postprocessing.php nfos true ...: To reset all nfos.\n'
.'php reset_postprocessing.php all true ...: To reset everything.\n'
)
);
ColorCLI::error(
'\nThis script will reset postprocessing per category. It can also truncate the associated tables.'
.'\nTo reset only those that have previously failed, those without covers, samples, previews, etc. use the '
.'second argument false.\n'
.'To reset even those previously post processed, use the second argument true.\n'
.'To truncate the associated table, use the third argument truncate.\n\n'
.'php reset_postprocessing.php consoles true ...: To reset all consoles.\n'
.'php reset_postprocessing.php games true ...: To reset all games.\n'
.'php reset_postprocessing.php movies true ...: To reset all movies.\n'
.'php reset_postprocessing.php music true ...: To reset all music.\n'
.'php reset_postprocessing.php misc true ...: To reset all misc.\n'
.'php reset_postprocessing.php tv true ...: To reset all tv.\n'
.'php reset_postprocessing.php anime true ...: To reset all anime.\n'
.'php reset_postprocessing.php books true ...: To reset all books.\n'
.'php reset_postprocessing.php xxx true ...: To reset all xxx.\n'
.'php reset_postprocessing.php nfos true ...: To reset all nfos.\n'
.'php reset_postprocessing.php all true ...: To reset everything.\n'
)
);
} else {
echo PHP_EOL;
}