Merge pull request #817 from JackDandy/feature/FixTvdbLib

Fix TVDb search issue when only 1 result is returned.
This commit is contained in:
JackDandy 2016-11-01 18:32:59 +00:00 committed by GitHub
commit fbabe57584
2 changed files with 3 additions and 0 deletions

View file

@ -221,6 +221,7 @@
* Fix "error trying to retrieve image" from tvdb due to there is no image to fetch
* Fix PiSexy for vip user class
* Change retry sleep timeout for Trakt searches to prevent issues when Trakt is down
* Fix TVDb search issue when only 1 result is returned
### 0.11.16 (2016-10-16 17:30:00 UTC)

View file

@ -649,6 +649,8 @@ class Tvdb:
try:
series_found = self._getetsrc(self.config['url_get_series'], self.config['params_get_series'])
if series_found:
if not isinstance(series_found['Series'], list):
series_found['Series'] = [series_found['Series']]
series_found['Series'] = [{k.lower(): v for k, v in s.iteritems()} for s in series_found['Series']]
return series_found.values()[0]
except: