mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-09-02 03:08:53 +00:00
Catch TVDB API Exception
This commit is contained in:
@@ -394,8 +394,12 @@ class TVDB extends TV
|
||||
$this->colorCli->notice('Fanart image not found on TVDB', true);
|
||||
}
|
||||
|
||||
$imdbid = $this->client->series()->getById($show->id);
|
||||
preg_match('/tt(?P<imdbid>\d{6,7})$/i', $imdbid->imdbId, $imdb);
|
||||
try {
|
||||
$imdbid = $this->client->series()->getById($show->id);
|
||||
preg_match('/tt(?P<imdbid>\d{6,7})$/i', $imdbid->imdbId, $imdb);
|
||||
} catch (ResourceNotFoundException $e) {
|
||||
$this->colorCli->notice('Show ID not found on TVDB', true);
|
||||
}
|
||||
|
||||
return [
|
||||
'type' => parent::TYPE_TV,
|
||||
|
||||
Reference in New Issue
Block a user