Пример #1
0
 public function isDownloadable(MineShow $mineShow, UpstreamShow $upstreamShow)
 {
     if (!$this->guessInfo->isSameShow($mineShow->getTitle(), $upstreamShow->getTitle())) {
         return false;
     }
     return 0 >= version_compare($mineShow->getVersion(), $upstreamShow->getVersion());
 }
Пример #2
0
 public function download(ShowInterface $show)
 {
     foreach ($this->downloaders as $downloader) {
         if ($show->getType() == $downloader->getSupportedType()) {
             $downloader->download($show);
             return;
         }
     }
     throw new \RunTimeException(sprintf('There is no downloaders for "%s" type', $show->getType()));
 }
Пример #3
0
 public function download(ShowInterface $show)
 {
     return copy($show->getTorrent(), $this->downloadDir . $show->__toString() . '.torrent');
 }
 public function addshow(ShowInterface $show)
 {
     if (false !== strpos($show->getTitle(), self::HQ_720)) {
         $this->getShowCollection()->addShow($show);
     }
 }