當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Console::processConsoleReleases方法代碼示例

本文整理匯總了PHP中Console::processConsoleReleases方法的典型用法代碼示例。如果您正苦於以下問題:PHP Console::processConsoleReleases方法的具體用法?PHP Console::processConsoleReleases怎麽用?PHP Console::processConsoleReleases使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Console的用法示例。


在下文中一共展示了Console::processConsoleReleases方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: processGames

 public function processGames()
 {
     if ($this->site->lookupgames == 1) {
         $console = new Console($this->echooutput);
         $console->processConsoleReleases();
     }
 }
開發者ID:ehsanguru,項目名稱:nnplus,代碼行數:7,代碼來源:postprocess.php

示例2: processGames

 /**
  * Lookup games if enabled
  */
 public function processGames()
 {
     if ($this->pdo->getSetting('lookupgames') == 1) {
         $console = new Console($this->echooutput);
         $console->processConsoleReleases();
     }
 }
開發者ID:engine9-,項目名稱:newznab-tmux,代碼行數:10,代碼來源:PostProcess.php

示例3: processReleases


//.........這裏部分代碼省略.........
         }
         //Clean release name
         $cleanArr = array('#', '@', '$', '%', '^', '§', '¨', '©', 'Ö');
         $cleanRelName = str_replace($cleanArr, '', $row['relname']);
         $relid = $db->queryInsert(sprintf("insert into releases (name, searchname, totalpart, groupID, adddate, guid, categoryID, regexID, rageID, postdate, fromname, size, reqID, passwordstatus, completion) values (%s, %s, %d, %d, now(), %s, %d, %d, -1, %s, %s, %s, %s, %d, %f)", $db->escapeString($cleanRelName), $db->escapeString($cleanRelName), $row["parts"], $row["groupID"], $db->escapeString($relguid), $catId, $regexID, $db->escapeString($bindata["date"]), $db->escapeString($bindata["fromname"]), $totalSize, $reqID, $page->site->checkpasswordedrar == "1" ? -1 : 0, $relCompletion > 100 ? 100 : $relCompletion));
         echo "Added release " . $cleanRelName . "\n";
         //
         // Tag every binary for this release with its parent release id
         // remove the release name from the binary as its no longer required
         //
         $db->query(sprintf("update binaries set procstat = %d, releaseID = %d where relname = %s and procstat = %d and groupID = %d and fromname=%s", Releases::PROCSTAT_RELEASED, $relid, $db->escapeString($row["relname"]), Releases::PROCSTAT_READYTORELEASE, $row["groupID"], $db->escapeString($row["fromname"])));
         //
         // Find an .nfo in the release
         //
         $relnfo = $nfo->determineReleaseNfo($relid);
         if ($relnfo !== false) {
             $nfo->addReleaseNfo($relid, $relnfo['ID']);
             $nfocount++;
         }
         //
         // Write the nzb to disk
         //
         $nzb->writeNZBforReleaseId($relid, $relguid, $cleanRelName, $catId, $nzb->getNZBPath($relguid, $page->site->nzbpath, true));
         if ($retcount % 5 == 0) {
             echo "-processed " . $retcount . " releases stage three\n";
         }
     }
     echo "Found " . $nfocount . " nfos in " . $retcount . " releases\n";
     //
     // Process nfo files
     //
     if ($page->site->lookupnfo != "1") {
         echo "Site config (site.lookupnfo) prevented retrieving nfos\n";
     } else {
         $nfo->processNfoFiles($page->site->lookupimdb, $page->site->lookuptvrage == "1");
     }
     //
     // Lookup imdb if enabled
     //
     if ($page->site->lookupimdb == 1) {
         $movie = new Movie(true);
         $movie->processMovieReleases();
     }
     //
     // Lookup music if enabled
     //
     if ($page->site->lookupmusic == 1) {
         $music = new Music(true);
         $music->processMusicReleases();
     }
     //
     // Lookup games if enabled
     //
     if ($page->site->lookupgames == 1) {
         $console = new Console(true);
         $console->processConsoleReleases();
     }
     //
     // Check for passworded releases
     //
     if ($page->site->checkpasswordedrar != "1") {
         echo "Site config (site.checkpasswordedrar) prevented checking releases are passworded\n";
     } else {
         $this->processPasswordedReleases(true);
     }
     //
     // Process all TV related releases which will assign their series/episode/rage data
     //
     $tvrage = new TVRage(true);
     $tvrage->processTvReleases($page->site->lookuptvrage == "1");
     //
     // Get the current datetime again, as using now() in the housekeeping queries prevents the index being used.
     //
     $currTime = $db->queryOneRow("SELECT NOW() as now");
     //
     // Tidy away any binaries which have been attempted to be grouped into
     // a release more than x times
     //
     echo "Tidying away binaries which cant be grouped after " . $page->site->attemptgroupbindays . " days\n";
     $db->query(sprintf("update binaries set procstat = %d where procstat = %d and dateadded < %s - interval %d day ", Releases::PROCSTAT_WRONGPARTS, Releases::PROCSTAT_NEW, $db->escapeString($currTime["now"]), $page->site->attemptgroupbindays));
     //
     // Delete any parts and binaries which are older than the site's retention days
     //
     echo "Deleting parts which are older than " . $page->site->rawretentiondays . " days\n";
     $db->query(sprintf("delete from parts where dateadded < %s - interval %d day", $db->escapeString($currTime["now"]), $page->site->rawretentiondays));
     echo "Deleting binaries which are older than " . $page->site->rawretentiondays . " days\n";
     $db->query(sprintf("delete from binaries where dateadded < %s - interval %d day", $db->escapeString($currTime["now"]), $page->site->rawretentiondays));
     //
     // Delete any releases which are older than site's release retention days
     //
     if ($page->site->releaseretentiondays != 0) {
         echo "Determining any releases past retention to be deleted.\n\n";
         $result = $db->query(sprintf("select ID from releases where postdate < %s - interval %d day", $db->escapeString($currTime["now"]), $page->site->releaseretentiondays));
         foreach ($result as $row) {
             $this->delete($row["ID"]);
         }
     }
     echo "Processed " . $retcount . " releases\n\n";
     return $retcount;
 }
開發者ID:priyavadan,項目名稱:newznab,代碼行數:101,代碼來源:releases.php


注:本文中的Console::processConsoleReleases方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。