mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-09-01 02:38:55 +00:00
Added filename parsing to IRCScraper
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ require_once(dirname(__FILE__) . "/../lib/showsleep.php");
|
||||
require_once(dirname(__FILE__) . "/../lib/functions.php");
|
||||
|
||||
|
||||
$version = "0.3r1147";
|
||||
$version = "0.3r1148";
|
||||
|
||||
$db = new DB();
|
||||
$functions = new Functions();
|
||||
|
||||
+10
-1
@@ -211,6 +211,10 @@ class IRCScraper extends IRCClient
|
||||
if ($matches['files'] !== 'N/A') {
|
||||
$this->CurPre['files'] = substr($matches['files'], 0, 50);
|
||||
}
|
||||
if (isset($matches['filename']) && $matches['filename'] !== 'N/A') {
|
||||
$this->CurPre['filename'] = $matches['filename'];
|
||||
}
|
||||
|
||||
if (isset($matches['nuked'])) {
|
||||
switch ($matches['nuked']) {
|
||||
case 'NUKED':
|
||||
@@ -271,6 +275,7 @@ class IRCScraper extends IRCClient
|
||||
$query .= (!empty($this->CurPre['reqid']) ? 'requestID, ' : '');
|
||||
$query .= (!empty($this->CurPre['groupid']) ? 'groupID, ' : '');
|
||||
$query .= (!empty($this->CurPre['nuked']) ? 'nuked, ' : '');
|
||||
$query .= (!empty($this->CurPre['filename']) ? 'filename, ' : '');
|
||||
|
||||
$query .= 'predate, md5, sha1, title) VALUES (';
|
||||
|
||||
@@ -282,6 +287,7 @@ class IRCScraper extends IRCClient
|
||||
$query .= (!empty($this->CurPre['reqid']) ? $this->CurPre['reqid'] . ', ' : '');
|
||||
$query .= (!empty($this->CurPre['groupid']) ? $this->CurPre['groupid'] . ', ' : '');
|
||||
$query .= (!empty($this->CurPre['nuked']) ? $this->CurPre['nuked'] . ', ' : '');
|
||||
$query .= (!empty($this->CurPre['filename']) ? $this->db->escapeString($this->CurPre['filename']) . ', ' : '');
|
||||
$query .= (!empty($this->CurPre['predate']) ? $this->CurPre['predate'] . ', ' : 'NOW(), ');
|
||||
|
||||
$query .= '%s, %s, %s)';
|
||||
@@ -321,6 +327,8 @@ class IRCScraper extends IRCClient
|
||||
$query .= (!empty($this->CurPre['groupid']) ? 'groupID = ' . $this->CurPre['groupid'] . ', ' : '');
|
||||
$query .= (!empty($this->CurPre['predate']) ? 'predate = ' . $this->CurPre['predate'] . ', ' : '');
|
||||
$query .= (!empty($this->CurPre['nuked']) ? 'nuked = ' . $this->CurPre['nuked'] . ', ' : '');
|
||||
$query .= (!empty($this->CurPre['filename']) ? 'filename = ' . $this->db->escapeString($this->CurPre['filename']) . ', ' : '');
|
||||
|
||||
$query .= (
|
||||
(empty($this->OldPre['category']) && !empty($this->CurPre['category']))
|
||||
? 'category = ' . $this->db->escapeString($this->CurPre['category']) . ', '
|
||||
@@ -439,7 +447,8 @@ class IRCScraper extends IRCClient
|
||||
'reqid' => '',
|
||||
'nuked' => '',
|
||||
'reason' => '',
|
||||
'files' => ''
|
||||
'files' => '',
|
||||
'filename' => ''
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user