Skip to content

Commit

Permalink
Merge pull request #3444 from costaht/patch-1
Browse files Browse the repository at this point in the history
Output torrent name during fetch:meta execution
  • Loading branch information
HDVinnie authored Jan 31, 2024
2 parents b0b5e74 + 877a1cc commit da98071
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/Console/Commands/FetchMeta.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,20 @@ public function handle(): void
$this->alert('Meta Fetcher Started');

$tmdbScraper = new TMDBScraper();
$torrents = Torrent::with('category')->select('tmdb', 'category_id')->whereNotNull('tmdb')->where('tmdb', '!=', 0)->oldest()->get();
$torrents = Torrent::with('category')->select('tmdb', 'category_id', 'name')->whereNotNull('tmdb')->where('tmdb', '!=', 0)->oldest()->get();

foreach ($torrents as $torrent) {
sleep(3);

if ($torrent->category->tv_meta) {
$tmdbScraper->tv($torrent->tmdb);
$this->info('TV Fetched');
$this->info(sprintf('(%s) Metadata Fetched For Torrent %s ', $torrent->category->name, $torrent->name));

}

if ($torrent->category->movie_meta) {
$tmdbScraper->movie($torrent->tmdb);
$this->info('Movie Fetched');
$this->info(sprintf('(%s) Metadata Fetched For Torrent %s ', $torrent->category->name, $torrent->name));
}
}

Expand Down

0 comments on commit da98071

Please sign in to comment.