Exemple #1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $show = new Show();
     $show->setName($input->getArgument('show'));
     $episode = Episode::fromString($input->getArgument('episode'));
     $magnet = $this->trackerClient->lookupTorrentMagnetUrl($show, $episode);
     if (!$magnet) {
         $output->writeln("Nothing found");
     } else {
         $output->writeln("Found: {$magnet}\n");
     }
 }
Exemple #2
0
 /**
  * @param $name
  * @param $lastEpisode
  * @return Show
  */
 public static function create($name, $lastEpisode)
 {
     return (new self())->setName($name)->setLastEpisode(Episode::fromString($lastEpisode));
 }