Commit b3215deb authored by echel0n's avatar echel0n
Browse files

Fixed issues with adding shows from IMDb

parent 439c6f94
......@@ -315,9 +315,12 @@ class AddShowByIDHandler(BaseHandler, ABC):
show_name = self.get_argument('showName')
if'tt\d+', series_id):
series_id =[SeriesProviderID.THETVDB].search(series_id)['id']
result =[SeriesProviderID.THETVDB].search(series_id)
if result and 'id' in result:
series_id = int(result['id'])
if find_show(int(series_id), SeriesProviderID.THETVDB):"{series_id} already exists in your show library, skipping!")
location = None
......@@ -295,7 +295,8 @@ class TheTVDB(SeriesProvider):"Searching for show by imdbId: {}".format(series))
resp = self._request('get', self.api['getSeriesIMDB'].format(id=series), language=language)
if resp and 'data' in resp:
search_result = resp['data']
if len(resp['data']) == 1:
search_result = resp['data'][0]
if not search_result:'Series search for {series} returned zero results, cannot find series on TheTVDB')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment