mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 02:01:33 +00:00
se bootstrap/autoload.php instead the bootstrap.php in root of install
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user