Catch TVDB API Exception

This commit is contained in:
Fossil
2020-04-26 21:15:09 +02:00
committed by GitHub
parent 72c26e3c8a
commit bf693fa9cb
+6 -2
View File
@@ -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,