当前位置: 首页>>代码示例>>PHP>>正文


PHP Movie::processMovieReleases方法代码示例

本文整理汇总了PHP中Movie::processMovieReleases方法的典型用法代码示例。如果您正苦于以下问题:PHP Movie::processMovieReleases方法的具体用法?PHP Movie::processMovieReleases怎么用?PHP Movie::processMovieReleases使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Movie的用法示例。


在下文中一共展示了Movie::processMovieReleases方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: processMovies

 public function processMovies()
 {
     if ($this->site->lookupimdb == 1) {
         $movie = new Movie($this->echooutput);
         $movie->processMovieReleases();
     }
 }
开发者ID:ehsanguru,项目名称:nnplus,代码行数:7,代码来源:postprocess.php

示例2: processMovies

 /**
  * Lookup imdb if enabled
  */
 public function processMovies()
 {
     if ($this->pdo->getSetting('lookupimdb') == 1) {
         $movie = new Movie($this->echooutput);
         $movie->processMovieReleases();
     }
 }
开发者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


注:本文中的Movie::processMovieReleases方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。