diff --git a/bin/postprocess.php b/bin/postprocess.php index 4c5387fce..8784f6bcd 100644 --- a/bin/postprocess.php +++ b/bin/postprocess.php @@ -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; diff --git a/lib/Pprocess.php b/lib/Pprocess.php index 25f4b3620..d49d12757 100644 --- a/lib/Pprocess.php +++ b/lib/Pprocess.php @@ -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. * diff --git a/lib/copy_this/www/lib/TmuxOutput.php b/lib/copy_this/www/lib/TmuxOutput.php index 304d519d4..45daf160d 100644 --- a/lib/copy_this/www/lib/TmuxOutput.php +++ b/lib/copy_this/www/lib/TmuxOutput.php @@ -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 ."]: ", diff --git a/lib/copy_this/www/lib/TmuxRun.php b/lib/copy_this/www/lib/TmuxRun.php index a2ee29404..4722e80ec 100644 --- a/lib/copy_this/www/lib/TmuxRun.php +++ b/lib/copy_this/www/lib/TmuxRun.php @@ -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" );