mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Update config/database mysql connection
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
2019-02-19 DariusIII
|
||||
* Chg: Use getRawHtml in place of Utility::getUrl in predb_import_daily_batch script
|
||||
* Chg: Update config/database mysql connection settings
|
||||
* Fix: Fix FanArt error when fetching covers
|
||||
* Fix: Fix missing number on group processing time message
|
||||
* Chg: Update nesbot/carbon (2.10.1 => 2.12.0)
|
||||
|
||||
@@ -102,7 +102,7 @@ foreach ($data as $dir => $files) {
|
||||
}
|
||||
|
||||
// Download the dump.
|
||||
$dump = Utility::getUrl(['url' => $file['download_url']]);
|
||||
$dump = getRawHtml($file['download_url']);
|
||||
echo "Downloading: {$file['download_url']}\n";
|
||||
|
||||
if (! $dump) {
|
||||
@@ -148,7 +148,6 @@ foreach ($data as $dir => $files) {
|
||||
|
||||
// Import file into predb_imports
|
||||
DB::unprepared("LOAD DATA {$local} INFILE '{$dumpFile}' IGNORE INTO TABLE predb_imports FIELDS TERMINATED BY '\\t\\t' OPTIONALLY ENCLOSED BY \"'\" LINES TERMINATED BY '\\r\\n' (title, nfo, size, files, filename, nuked, nukereason, category, predate, source, requestid, groupname)");
|
||||
DB::commit();
|
||||
|
||||
// Remove any titles where length <=8
|
||||
if ($verbose === true) {
|
||||
@@ -167,7 +166,7 @@ foreach ($data as $dir => $files) {
|
||||
DB::update('UPDATE predb_imports AS pi SET groups_id = (SELECT id FROM usenet_groups WHERE name = pi.groupname) WHERE groupname IS NOT NULL');
|
||||
|
||||
$colorCli->info('Inserting records from temporary table into predb table');
|
||||
$inserted = DB::insert("INSERT INTO predb (title, nfo, size, files, filename, nuked, nukereason, category, predate, SOURCE, requestid, groups_id)
|
||||
$inserted = DB::insert("INSERT INTO predb (title, nfo, size, files, filename, nuked, nukereason, category, predate, source, requestid, groups_id)
|
||||
SELECT pi.title, pi.nfo, pi.size, pi.files, pi.filename, pi.nuked, pi.nukereason, pi.category, pi.predate, pi.source, pi.requestid, groups_id
|
||||
FROM predb_imports AS pi
|
||||
ON DUPLICATE KEY UPDATE predb.nfo = IF(predb.nfo IS NULL, pi.nfo, predb.nfo),
|
||||
@@ -214,15 +213,7 @@ function settings_array($last = null, $settings = null)
|
||||
|
||||
function getDirListing($url)
|
||||
{
|
||||
$result = Utility::getUrl(
|
||||
[
|
||||
'url' => $url,
|
||||
'requestheaders' => [
|
||||
'Content-Type: application/json',
|
||||
'User-Agent: nZEDb',
|
||||
],
|
||||
]
|
||||
);
|
||||
$result = getRawHtml($url);
|
||||
|
||||
if ($result === false) {
|
||||
exit('Error connecting to GitHub, try again later?'.PHP_EOL);
|
||||
|
||||
@@ -51,6 +51,9 @@ return [
|
||||
'collation' => 'utf8_unicode_ci',
|
||||
'strict' => false,
|
||||
'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',
|
||||
'options' => [
|
||||
\PDO::MYSQL_ATTR_LOCAL_INFILE => true,
|
||||
],
|
||||
],
|
||||
|
||||
'pgsql' => [
|
||||
|
||||
Reference in New Issue
Block a user