From b8c5eac61f0e86f0e05546bce1bbe8d99d1bff04 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Sat, 29 Oct 2016 17:52:51 +0100 Subject: [PATCH] Fix "error trying to retrieve image" from TVDb due to attempts made when there is no image to fetch. --- CHANGES.md | 1 + lib/tvdb_api/tvdb_api.py | 2 +- sickbeard/providers/omgwtfnzbs.py | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 598356e5..4b92ccc5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -218,6 +218,7 @@ * Change image cache processing for browse Trakt page * Change logging for newznab response code 910 and add check for empty response data * Change improve reverse proxy web_root support +* Fix "error trying to retrieve image" from tvdb due to there is no image to fetch ### 0.11.16 (2016-10-16 17:30:00 UTC) diff --git a/lib/tvdb_api/tvdb_api.py b/lib/tvdb_api/tvdb_api.py index 5e34ed2d..fbc70258 100644 --- a/lib/tvdb_api/tvdb_api.py +++ b/lib/tvdb_api/tvdb_api.py @@ -864,7 +864,7 @@ class Tvdb: if None is not v: if 'filename' == k: - v = self.config['url_artworkPrefix'] % v + v = v and (self.config['url_artworkPrefix'] % v) or v else: v = self._clean_data(v) diff --git a/sickbeard/providers/omgwtfnzbs.py b/sickbeard/providers/omgwtfnzbs.py index 5b8ba6c1..27739a85 100644 --- a/sickbeard/providers/omgwtfnzbs.py +++ b/sickbeard/providers/omgwtfnzbs.py @@ -99,8 +99,11 @@ class OmgwtfnzbsProvider(generic.NZBProvider): data = self.get_url(url, timeout=90) if not data: return result + if 'Limit Reached' in data: + logger.log('Daily Nzb Download limit reached', logger.DEBUG) + return result if '' not in data or 'seem to be logged in' in data: - logger.log(u'Failed nzb data response: %s' % data, logger.DEBUG) + logger.log('Failed nzb data response: %s' % data, logger.DEBUG) return result result = classes.NZBDataSearchResult(episodes) result.extraInfo += [data]