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