示例#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");
     }
 }
示例#2
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $name = $input->getArgument('name');
     $episode = $input->getArgument('episode');
     $show = Show::create($name, $episode);
     $this->repo->save($show);
 }