} // Run through our potential GET queries if ($_GET['artistName']) { if (DEBUG) { echo "<pre>"; } processArtistName(urlencode($_GET['artistName'])); if (DEBUG) { echo "</pre>"; } } else { if ($_GET['artistID']) { if (DEBUG) { echo "<pre>"; } processReleases(urlencode($_GET['artistID'])); if (DEBUG) { echo "</pre>"; } } else { if ($_GET['releaseID']) { if (DEBUG) { echo "<pre>"; } processTracks(urlencode($_GET['releaseID'])); if (DEBUG) { echo "</pre>"; } } } }
// Get the group info from MySQL. $groupMySQL = $pdo->queryOneRow(sprintf('SELECT * FROM groups WHERE id = %d', $options[2])); if ($groupMySQL === false) { exit('ERROR: Group not found with ID ' . $options[2] . PHP_EOL); } // Connect to NNTP. $nntp = nntp($pdo); $backFill = new Backfill(['NNTP' => $nntp, 'Settings' => $pdo], true); // Update the group for new binaries. (new Binaries(['NNTP' => $nntp, 'Settings' => $pdo]))->updateGroup($groupMySQL); // BackFill the group with 20k articles. $backFill->backfillAllGroups($groupMySQL['name'], 20000, 'normal'); // Check if we got anything from binaries/backFill, exit if not. collectionCheck($pdo, $options[2]); // Create releases. processReleases($pdo, new ProcessReleases(['Settings' => $pdo]), $options[2]); // Post process the releases. (new ProcessAdditional(['Echo' => true, 'NNTP' => $nntp, 'Settings' => $pdo]))->start($options[2]); (new Nfo(['Echo' => true, 'Settings' => $pdo]))->processNfoFiles($nntp, $options[2]); } break; // Post process additional and NFO. // $options[2] => (char)Letter or number a-f 0-9, first character of release guid. // Post process additional and NFO. // $options[2] => (char)Letter or number a-f 0-9, first character of release guid. case 'pp_additional': case 'pp_nfo': if (charCheck($options[2])) { $pdo = new Settings(); // Create the connection here and pass, this is for post processing, so check for alternate. $nntp = nntp($pdo, true);
if (is_numeric($options[2])) { $pdo = new Settings(); // Get the group info from MySQL. $groupMySQL = $pdo->queryOneRow(sprintf('SELECT * FROM groups WHERE id = %d', $options[2])); if ($groupMySQL === false) { exit('ERROR: Group not found with id ' . $options[2] . PHP_EOL); } // Connect to NNTP. $nntp = nntp($pdo); $backFill = new \Backfill(); // Update the group for new binaries. (new \Binaries())->updateGroup($groupMySQL); // BackFill the group with 20k articles. $backFill->backfillAllGroups($groupMySQL['name'], 20000, 'normal'); // Create releases. processReleases(new \Releases(['Settings' => $pdo]), $options[2]); // Post process the releases. (new ProcessAdditional(['Echo' => true, 'NNTP' => $nntp, 'Settings' => $pdo]))->start($options[2]); (new \Info(['Echo' => true, 'Settings' => $pdo]))->processNfoFiles($nntp, $options[2]); } break; // Post process additional and NFO. // $options[2] => (char)Letter or number a-f 0-9, first character of release guid. // Post process additional and NFO. // $options[2] => (char)Letter or number a-f 0-9, first character of release guid. case 'pp_additional': case 'pp_nfo': if (charCheck($options[2])) { $pdo = new Settings(); // Create the connection here and pass, this is for post processing, so check for alternate. $nntp = nntp($pdo, true);