Added spotnab processing to sharing window. Enable spotnab in site settings.

This commit is contained in:
DariusIII
2014-11-15 01:06:52 +01:00
parent 47931313ae
commit 930b52fa34
4 changed files with 30 additions and 1 deletions
+5
View File
@@ -34,6 +34,7 @@ $args = array(
'nfo' => true,
'pre' => true,
'sharing' => true,
'spotnab' => true,
'tv' => false,
'tvdb' => false,
'xxx' => false,
@@ -63,6 +64,7 @@ if (!isset($argv[1]) || !in_array($argv[1], $args) || !isset($argv[2]) || !in_ar
. "php postprocess.php xxx true ...: Processes xxx.\n"
. "php postprocess.php additional true ...: Processes previews/mediainfo/etc...\n"
. "php postprocess.php sharing true ...: Processes uploading/downloading comments.\n"
. "php postprocess.php spotnab true ...: Processes uploading/downloading comments from spotnab.\n"
. "php postprocess.php allinf true ...: Does all the types of post processing on a loop, sleeping 15 seconds between.\n"
. "php postprocess.php amazon true ...: Does all the amazon (books/console/games/music/xxx).\n"
)
@@ -132,6 +134,9 @@ switch ($argv[1]) {
case 'sharing':
$postProcess->processSharing($nntp);
break;
case 'spotnab':
$postProcess->processSpotnab($nntp);
break;
case 'tv':
$postProcess->processTV('', (isset($argv[3]) && in_array($argv[3], $charArray) ? $argv[3] : ''));
break;
+23
View File
@@ -19,6 +19,7 @@ require_once(WWW_DIR . "lib/anidb.php");
require_once(WWW_DIR . "lib/book.php");
require_once(WWW_DIR. "lib/Books.php");
require_once(WWW_DIR . "lib/Games.php");
require_once(WWW_DIR . "lib/spotnab.php");
require_once(WWW_DIR . "lib/thetvdb.php");
require_once(WWW_DIR . "lib/XXX.php");
require_once(WWW_DIR . "lib/Logger.php");
@@ -144,6 +145,7 @@ class PProcess
{
$this->processAdditional($nntp);
$this->processNfos($nntp);
$this->processSpotnab();
$this->processSharing($nntp);
$this->processMovies();
$this->processMusic();
@@ -250,6 +252,27 @@ class PProcess
}
}
/**
* Process Global IDs
*/
public function processSpotnab(&$nntp)
{
$spotnab = new SpotNab();
$processed = $spotnab->processGID(500);
if ($processed > 0) {
if ($this->echooutput) {
$this->pdo->log->doEcho(
$this->pdo->log->primary('Updating GID in releases table ' . $processed . ' release(s) updated')
);
}
}
$spotnab->auto_post_discovery();
$spotnab->fetch_discovery();
$spotnab->fetch();
$spotnab->post();
$spotnab->auto_clean();
}
/**
* Process comments.
*
+1 -1
View File
@@ -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.5r0056';
$tversion = '0.5r0059';
$buffer .= sprintf($this->tmpMasks[2],
"Monitor $state v$tversion @ $this->_tvers [" . $this->_vers ."]: ",
+1
View File
@@ -699,6 +699,7 @@ class TmuxRun extends Tmux
if (shell_exec("tmux list-panes -t{$runVar['constants']['tmux_session']}:${pane} | grep ^0 | grep -c dead") == 1) {
shell_exec(
"tmux respawnp -t{$runVar['constants']['tmux_session']}:${pane}.0 ' \
{$runVar['commands']['_php']} {$runVar['paths']['misc']}/update_scripts/nix_scripts/tmux/bin/postprocess.php spotnab true; \
{$runVar['commands']['_php']} {$runVar['paths']['misc']}/update_scripts/nix_scripts/tmux/bin/postprocess.php sharing true; \
{$runVar['commands']['_sleep']} {$runVar['settings']['sharing_timer']}' 2>&1 1> /dev/null"
);