summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--libs/subliminal_patch/providers/wizdom.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/subliminal_patch/providers/wizdom.py b/libs/subliminal_patch/providers/wizdom.py
index 147cccb16..a68102203 100644
--- a/libs/subliminal_patch/providers/wizdom.py
+++ b/libs/subliminal_patch/providers/wizdom.py
@@ -120,7 +120,11 @@ class WizdomProvider(Provider):
r = self.session.get('http://api.tmdb.org/3/{}/{}{}?api_key={}&language=en'.format(
category, tmdb_id, '' if is_movie else '/external_ids', self._tmdb_api_key))
r.raise_for_status()
- return str(r.json().get('imdb_id', '')) or None
+ imdb_id = r.json().get('imdb_id')
+ if imdb_id:
+ return str(imdb_id)
+ else:
+ return None
return None
def query(self, title, season=None, episode=None, year=None, filename=None, imdb_id=None):
@@ -185,6 +189,7 @@ class WizdomProvider(Provider):
imdb_id = video.series_imdb_id
else:
titles = [video.title] + video.alternative_titles
+ imdb_id = video.imdb_id
for title in titles:
subtitles = [s for s in