mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Rename PProcess class into PostProcess, adjust other scripts and classes for the change.
This commit is contained in:
@@ -7,7 +7,7 @@ if (!isset($argv[1])) {
|
||||
require_once dirname(__FILE__) . '/../../../../../www/config.php';
|
||||
|
||||
use \newznab\db\Settings;
|
||||
use \newznab\processing\PProcess;
|
||||
use \newznab\processing\PostProcess;
|
||||
use \newznab\processing\ProcessReleases;
|
||||
use \newznab\processing\post\ProcessAdditional;
|
||||
|
||||
@@ -249,7 +249,7 @@ switch ($options[1]) {
|
||||
case 'pp_movie':
|
||||
if (charCheck($options[2])) {
|
||||
$pdo = new Settings();
|
||||
(new PProcess(['Settings' => $pdo]))->processMovies('', $options[2], (isset($options[3]) ? $options[3] : ''));
|
||||
(new PostProcess(['Settings' => $pdo]))->processMovies('', $options[2], (isset($options[3]) ? $options[3] : ''));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -261,7 +261,7 @@ switch ($options[1]) {
|
||||
case 'pp_tv':
|
||||
if (charCheck($options[2])) {
|
||||
$pdo = new Settings();
|
||||
(new PProcess(['Settings' => $pdo]))->processTv('', $options[2], (isset($options[3]) ? $options[3] : ''));
|
||||
(new PostProcess(['Settings' => $pdo]))->processTv('', $options[2], (isset($options[3]) ? $options[3] : ''));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
require_once(dirname(__FILE__) . "/config.php");
|
||||
|
||||
use newznab\db\Settings;
|
||||
use newznab\processing\PProcess;
|
||||
use newznab\processing\PostProcess;
|
||||
|
||||
$c = new ColorCLI();
|
||||
if (!isset($argv[1])) {
|
||||
@@ -62,7 +62,7 @@ if (!isset($argv[1])) {
|
||||
$relID = $pieces[1];
|
||||
$guid = $pieces[2];
|
||||
$groupID = $pieces[3];
|
||||
$nzbcontents = new NZBContents(array('echo' => true, 'nntp' => $nntp, 'nfo' => new Nfo(), 'db' => $db, 'pp' => new PProcess(['Settings' => $pdo, 'Nfo' => $Nfo, 'NameFixer' => $namefixer])));
|
||||
$nzbcontents = new NZBContents(array('echo' => true, 'nntp' => $nntp, 'nfo' => new Nfo(), 'db' => $db, 'pp' => new PostProcess(['Settings' => $pdo, 'Nfo' => $Nfo, 'NameFixer' => $namefixer])));
|
||||
$res = $nzbcontents->checkPAR2($guid, $relID, $groupID, 1, 1);
|
||||
if ($res === false) {
|
||||
echo '.';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
require_once(dirname(__FILE__) . "/config.php");
|
||||
|
||||
use newznab\db\Settings;
|
||||
use newznab\processing\PProcess;
|
||||
use newznab\processing\PostProcess;
|
||||
|
||||
$pdo = new Settings();
|
||||
|
||||
@@ -136,7 +136,7 @@ if (!isset($argv[1])) {
|
||||
$nzbcontents = new NZBContents(
|
||||
array(
|
||||
'Echo' => true, 'NNTP' => $nntp, 'Nfo' => $Nfo, 'Settings' => $pdo,
|
||||
'PostProcess' => new PProcess(['Settings' => $pdo, 'Nfo' => $Nfo, 'NameFixer' => $namefixer])
|
||||
'PostProcess' => new PostProcess(['Settings' => $pdo, 'Nfo' => $Nfo, 'NameFixer' => $namefixer])
|
||||
)
|
||||
);
|
||||
foreach ($releases as $release) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
require_once(dirname(__FILE__) . '/config.php');
|
||||
|
||||
use newznab\db\Settings;
|
||||
use newznab\processing\PProcess;
|
||||
use newznab\processing\PostProcess;
|
||||
|
||||
$pdo = new Settings();
|
||||
/**
|
||||
@@ -70,7 +70,7 @@ if ($args[$argv[1]] === true) {
|
||||
}
|
||||
}
|
||||
|
||||
$postProcess = new PProcess(['Settings' => $pdo, 'Echo' => ($argv[2] === 'true' ? true : false)]);
|
||||
$postProcess = new PostProcess(['Settings' => $pdo, 'Echo' => ($argv[2] === 'true' ? true : false)]);
|
||||
|
||||
$charArray = ['a','b','c','d','e','f','0','1','2','3','4','5','6','7','8','9'];
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
require_once(dirname(__FILE__) . '/config.php');
|
||||
|
||||
use newznab\processing\PProcess;
|
||||
use newznab\processing\PostProcess;
|
||||
|
||||
|
||||
$c = new ColorCLI();
|
||||
@@ -15,7 +15,7 @@ $torun = $tmux->get()->post;
|
||||
|
||||
$pieces = explode(' =+= ', $argv[1]);
|
||||
|
||||
$postprocess = new PProcess(['Echo' => true]);
|
||||
$postprocess = new PostProcess(['Echo' => true]);
|
||||
if (isset($pieces[6])) {
|
||||
// Create the connection here and pass
|
||||
$nntp = new NNTP();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
use newznab\db\Settings;
|
||||
use \newznab\processing\PProcess;
|
||||
use \newznab\processing\PostProcess;
|
||||
use newznab\utility\Utility;
|
||||
|
||||
/**
|
||||
@@ -30,7 +30,7 @@ Class NZBContents
|
||||
protected $nfo;
|
||||
|
||||
/**
|
||||
* @var PProcess
|
||||
* @var PostProcess
|
||||
* @access protected
|
||||
*/
|
||||
protected $pp;
|
||||
@@ -69,7 +69,7 @@ Class NZBContents
|
||||
* 'Nfo' => Nfo ; Class Nfo.
|
||||
* 'NZB' => NZB ; Class NZB.
|
||||
* 'Settings' => DB ; Class newznab\db\Settings.
|
||||
* 'PostProcess' => PProcess ; Class PProcess.
|
||||
* 'PostProcess' => PostProcess ; Class PostProcess.
|
||||
* )
|
||||
*
|
||||
* @access public
|
||||
@@ -91,9 +91,9 @@ Class NZBContents
|
||||
$this->nntp = ($options['NNTP'] instanceof \NNTP ? $options['NNTP'] : new \NNTP(['Echo' => $this->echooutput, 'Settings' => $this->pdo]));
|
||||
$this->nfo = ($options['Nfo'] instanceof \Nfo ? $options['Nfo'] : new \Nfo(['Echo' => $this->echooutput, 'Settings' => $this->pdo]));
|
||||
$this->pp = (
|
||||
$options['PostProcess'] instanceof PProcess
|
||||
$options['PostProcess'] instanceof PostProcess
|
||||
? $options['PostProcess']
|
||||
: new PProcess(['Echo' => $this->echooutput, 'Nfo' => $this->nfo, 'Settings' => $this->pdo])
|
||||
: new PostProcess(['Echo' => $this->echooutput, 'Nfo' => $this->nfo, 'Settings' => $this->pdo])
|
||||
);
|
||||
$this->nzb = ($options['NZB'] instanceof \NZB ? $options['NZB'] : new \NZB($this->pdo));
|
||||
$t = new Tmux();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
use newznab\db\Settings;
|
||||
use \newznab\processing\PProcess;
|
||||
use \newznab\processing\PostProcess;
|
||||
use newznab\utility\Utility;
|
||||
|
||||
//This script is ported from nZEDb and adapted for newznab
|
||||
@@ -349,7 +349,7 @@ class NameFixer
|
||||
'NNTP' => $nntp,
|
||||
'Nfo' => $Nfo,
|
||||
'Settings' => $this->pdo,
|
||||
'PostProcess' => new PProcess(['Settings' => $this->pdo, 'Nfo' => $Nfo])
|
||||
'PostProcess' => new PostProcess(['Settings' => $this->pdo, 'Nfo' => $Nfo])
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
use newznab\db\Settings;
|
||||
use \newznab\processing\PProcess;
|
||||
use \newznab\processing\PostProcess;
|
||||
use newznab\utility\Utility;
|
||||
|
||||
require_once NN_LIBS . 'getid3/getid3/getid3.php';
|
||||
@@ -220,7 +220,7 @@ class Nfo
|
||||
'NNTP' => $nntp,
|
||||
'Nfo' => $this,
|
||||
'Settings' => $this->pdo,
|
||||
'PostProcess' => new PProcess(['Echo' => $this->echo, 'Settings' => $this->pdo, 'Nfo' => $this])
|
||||
'PostProcess' => new PostProcess(['Echo' => $this->echo, 'Settings' => $this->pdo, 'Nfo' => $this])
|
||||
]
|
||||
);
|
||||
$nzbContents->parseNZB($release['guid'], $release['id'], $release['groupid']);
|
||||
@@ -335,7 +335,7 @@ class Nfo
|
||||
'NNTP' => $nntp,
|
||||
'Nfo' => $this,
|
||||
'Settings' => $this->pdo,
|
||||
'PostProcess' => new PProcess(['Echo' => $this->echo, 'Nfo' => $this, 'Settings' => $this->pdo])
|
||||
'PostProcess' => new PostProcess(['Echo' => $this->echo, 'Nfo' => $this, 'Settings' => $this->pdo])
|
||||
]
|
||||
);
|
||||
$movie = new Movie(['Echo' => $this->echo, 'Settings' => $this->pdo]);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
namespace newznab\libraries;
|
||||
|
||||
use \newznab\db\Settings;
|
||||
use \newznab\processing\PProcess;
|
||||
use \newznab\processing\PostProcess;
|
||||
|
||||
require_once(NN_LIBS . 'forkdaemon-php' . DS . 'fork_daemon.php');
|
||||
|
||||
@@ -863,7 +863,7 @@ class Forking extends \fork_daemon
|
||||
if ($sharing !== false && $sharing['enabled'] == 1) {
|
||||
$nntp = new \NNTP(['Settings' => $this->pdo]);
|
||||
if (($this->pdo->getSetting('alternate_nntp') == 1 ? $nntp->doConnect(true, true) : $nntp->doConnect()) === true) {
|
||||
(new PProcess(['Settings' => $this->pdo, 'ColorCLI' => $this->_colorCLI]))->processSharing($nntp);
|
||||
(new PostProcess(['Settings' => $this->pdo, 'ColorCLI' => $this->_colorCLI]))->processSharing($nntp);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -875,7 +875,7 @@ class Forking extends \fork_daemon
|
||||
*/
|
||||
private function processSingle()
|
||||
{
|
||||
$postProcess = new PProcess(['Settings' => $this->pdo, 'ColorCLI' => $this->_colorCLI]);
|
||||
$postProcess = new PostProcess(['Settings' => $this->pdo, 'ColorCLI' => $this->_colorCLI]);
|
||||
//$postProcess->processAnime();
|
||||
$postProcess->processBooks();
|
||||
$postProcess->processConsoles();
|
||||
|
||||
@@ -7,7 +7,7 @@ use \newznab\processing\post\ProcessAdditional;
|
||||
|
||||
require_once NN_LIBS . 'rarinfo/par2info.php';
|
||||
|
||||
class PProcess
|
||||
class PostProcess
|
||||
{
|
||||
/**
|
||||
* @var \newznab\db\Settings
|
||||
@@ -828,7 +828,7 @@ class ProcessReleases
|
||||
public function postProcessReleases($postProcess, &$nntp)
|
||||
{
|
||||
if ($postProcess == 1) {
|
||||
(new PProcess(['Echo' => $this->echoCLI, 'Settings' => $this->pdo, 'Groups' => $this->groups]))->processAll($nntp);
|
||||
(new PostProcess(['Echo' => $this->echoCLI, 'Settings' => $this->pdo, 'Groups' => $this->groups]))->processAll($nntp);
|
||||
} else {
|
||||
if ($this->echoCLI) {
|
||||
$this->pdo->log->doEcho(
|
||||
|
||||
Reference in New Issue
Block a user