mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Update the data/cli/populate_anidb.php script
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
2017-04-18 DariusIII
|
||||
* Chg: Update the data/cli/populate_anidb.php script
|
||||
* Chg: Update nntmux/db/populate/AniDB.php to properly update anidb_episodes table (still need to find a way to prevent bans)
|
||||
2017-04-17 DariusIII
|
||||
* Chg: Update AniDB and related pages updateTitle function
|
||||
|
||||
@@ -9,11 +9,16 @@ use nntmux\db\populate\AniDB;
|
||||
|
||||
$pdo = new DB();
|
||||
|
||||
if ($argc > 1 && $argv[1] == true) {
|
||||
(new AniDB(['Settings' => $pdo, 'Echo' => true]))->populateTable('full');
|
||||
if ($argc > 1 && $argv[1] === 'true' && isset($argv[2])) {
|
||||
if($argv[2] === 'full') {
|
||||
(new AniDB(['Settings' => $pdo, 'Echo' => true]))->populateTable('full');
|
||||
} elseif ($argv[2] === 'info'){
|
||||
(new AniDB(['Settings' => $pdo, 'Echo' => true]))->populateTable('info');
|
||||
}
|
||||
} else {
|
||||
$pdo->log->doEcho(PHP_EOL . $pdo->log->error(
|
||||
'To execute this script you must provide a boolean argument.' . PHP_EOL .
|
||||
'Argument1: true|false to run this script or not'), true
|
||||
'Argument1: true|false to run this script or not' . PHP_EOL .
|
||||
'Argument2: full|info for what type of data to populate'), true
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user