Commit e2132a29 authored by echel0n's avatar echel0n
Browse files

Fixed issue#286 - added support for non-english indexer images

parent ef827f75
# Changelog # Changelog
- * 0929705 - 2018-10-14: Release v9.3.87 - * 8d0178c - 2018-10-14: Fixed issue#286 - added support for non-english indexer images
- * d186f55 - 2018-10-14: Release v9.3.87
- * ca05ceb - 2018-10-14: Fixed issue with freebsd init script not daemonizing the app - * ca05ceb - 2018-10-14: Fixed issue with freebsd init script not daemonizing the app
- * 10fc6b3 - 2018-10-14: Release v9.3.86 - * 10fc6b3 - 2018-10-14: Release v9.3.86
- * b0c7dc9 - 2018-10-13: Release v9.3.85 - * b0c7dc9 - 2018-10-13: Release v9.3.85
......
...@@ -644,14 +644,23 @@ class Tvdb: ...@@ -644,14 +644,23 @@ class Tvdb:
def images(self, sid, key_type='poster', season=None): def images(self, sid, key_type='poster', season=None):
sickrage.app.log.debug('Getting {} images for {}'.format(key_type, sid)) sickrage.app.log.debug('Getting {} images for {}'.format(key_type, sid))
try: images = []
if not season: for language in [self.config['api']['lang'], self.config['language']]:
images = self._request('get', self.config['api']['images'][key_type].format(id=sid), if len(images):
self.config['api']['lang'])['data'] continue
else:
images = self._request('get', self.config['api']['images'][key_type].format(id=sid, season=season), try:
self.config['api']['lang'])['data'] if not season:
except tvdb_error: images = self._request('get', self.config['api']['images'][key_type].format(id=sid),
language)['data']
else:
images = self._request('get', self.config['api']['images'][key_type].format(id=sid, season=season),
language)['data']
except tvdb_error:
continue
# unable to retrieve images in languages wanted
if not images:
return [] return []
for i, image in enumerate(images): for i, image in enumerate(images):
......
Supports Markdown
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