mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-31 10:18:55 +00:00
Don't remove releases with exe from pc->mac, as CORE has executable their mac releases.
This commit is contained in:
+61
-58
@@ -16,59 +16,14 @@ require_once("Enzebe.php");
|
||||
class ReleaseRemover
|
||||
{
|
||||
/**
|
||||
* @var DB
|
||||
* @const New line.
|
||||
*/
|
||||
protected $pdo;
|
||||
const N = PHP_EOL;
|
||||
|
||||
/**
|
||||
* @var NZB
|
||||
*/
|
||||
private $nzb;
|
||||
|
||||
/**
|
||||
* @var ConsoleTools
|
||||
*/
|
||||
protected $consoleTools;
|
||||
|
||||
/**
|
||||
* @var Releases
|
||||
*/
|
||||
protected $releases;
|
||||
|
||||
/**
|
||||
* The query we will use to select unwanted releases.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $query;
|
||||
|
||||
/**
|
||||
* If an error occurred, store it here.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $error;
|
||||
|
||||
/**
|
||||
* Time we started.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $timeStart;
|
||||
|
||||
/**
|
||||
* Result of the select query.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $result;
|
||||
|
||||
/**
|
||||
* Ignore user check?
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $ignoreUserCheck;
|
||||
protected $blacklistID;
|
||||
|
||||
/**
|
||||
* Is is run from the browser?
|
||||
@@ -77,15 +32,20 @@ class ReleaseRemover
|
||||
*/
|
||||
protected $browser;
|
||||
|
||||
/**
|
||||
* @var ConsoleTools
|
||||
*/
|
||||
protected $consoleTools;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $crapTime = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @var bool
|
||||
*/
|
||||
protected $method = '';
|
||||
protected $delete;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
@@ -95,22 +55,62 @@ class ReleaseRemover
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $delete;
|
||||
protected $echoCLI;
|
||||
|
||||
/**
|
||||
* If an error occurred, store it here.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $error;
|
||||
|
||||
/**
|
||||
* Ignore user check?
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $echoCLI;
|
||||
protected $ignoreUserCheck;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $blacklistID;
|
||||
protected $method = '';
|
||||
|
||||
/**
|
||||
* @const New line.
|
||||
* @var nzedb\db\Settings
|
||||
*/
|
||||
const N = PHP_EOL;
|
||||
protected $pdo;
|
||||
|
||||
/**
|
||||
* The query we will use to select unwanted releases.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $query;
|
||||
|
||||
/**
|
||||
* @var Releases
|
||||
*/
|
||||
protected $releases;
|
||||
|
||||
/**
|
||||
* Result of the select query.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $result;
|
||||
|
||||
/**
|
||||
* Time we started.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $timeStart;
|
||||
|
||||
/**
|
||||
* @var NZB
|
||||
*/
|
||||
private $nzb;
|
||||
|
||||
/**
|
||||
* Construct.
|
||||
@@ -231,10 +231,12 @@ class ReleaseRemover
|
||||
|
||||
$time = trim($time);
|
||||
$this->crapTime = '';
|
||||
$type = strtolower(trim($type));
|
||||
|
||||
switch ($time) {
|
||||
case 'full':
|
||||
if ($this->echoCLI) {
|
||||
echo $this->pdo->log->header("Removing crap releases - no time limit.\n");
|
||||
echo $this->pdo->log->header("Removing " . ($type == '' ? "All crap releases " : $type . " crap releases") . " - no time limit.\n");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -244,7 +246,7 @@ class ReleaseRemover
|
||||
return $this->returnError();
|
||||
}
|
||||
if ($this->echoCLI) {
|
||||
echo $this->pdo->log->header('Removing crap releases from the past ' . $time . " hour(s).\n");
|
||||
echo $this->pdo->log->header("Removing " . ($type == '' ? "All crap releases " : $type . " crap releases") . " from the past " . $time . " hour(s).\n");
|
||||
}
|
||||
$this->crapTime = ' AND r.adddate > (NOW() - INTERVAL ' . $time . ' HOUR)';
|
||||
break;
|
||||
@@ -430,12 +432,13 @@ class ReleaseRemover
|
||||
INNER JOIN releasefiles rf ON rf.releaseID = r.ID
|
||||
WHERE r.searchname NOT LIKE %s
|
||||
AND rf.name LIKE %s
|
||||
AND r.categoryID NOT IN (%d, %d, %d, %d, %d) %s",
|
||||
AND r.categoryID NOT IN (%d, %d, %d, %d, %d, %d) %s",
|
||||
"'%.exes%'",
|
||||
"'%.exe%'",
|
||||
\Category::CAT_PC_0DAY,
|
||||
\Category::CAT_PC_GAMES,
|
||||
\Category::CAT_PC_ISO,
|
||||
\Category::CAT_PC_MAC,
|
||||
\Category::CAT_MISC_OTHER,
|
||||
\Category::CAT_MISC_HASHED,
|
||||
$this->crapTime
|
||||
|
||||
@@ -117,7 +117,7 @@ class TmuxOutput extends Tmux
|
||||
$buffer = '';
|
||||
$state = ($this->runVar['settings']['is_running'] == 1) ? 'Running' : 'Disabled';
|
||||
//$version = $this->_tvers . 'r' . $this->_vers;
|
||||
$tversion = '0.5r01112';
|
||||
$tversion = '0.5r01113';
|
||||
|
||||
$buffer .= sprintf($this->tmpMasks[2],
|
||||
"Monitor $state v$tversion @ $this->_tvers [" . $this->_vers ."]: ",
|
||||
|
||||
Reference in New Issue
Block a user