Merge pull request #603 from JackDandy/feature/ChangeTimeoutProvOWN

Change give OMGWTFNZBS provider more time to respond.
This commit is contained in:
JackDandy 2016-01-07 16:29:55 +00:00
commit ed4d165ee7
2 changed files with 9 additions and 7 deletions

View file

@ -108,6 +108,7 @@
* Fix issue on Add Existing Shows page where shows were listed that should not have been * Fix issue on Add Existing Shows page where shows were listed that should not have been
* Change get_size helper to also handle files * Change get_size helper to also handle files
* Change improve handling of a bad email notify setting * Change improve handling of a bad email notify setting
* Change give OMGWTFNZBS provider more time to respond
### 0.10.0 (2015-08-06 11:05:00 UTC) ### 0.10.0 (2015-08-06 11:05:00 UTC)

View file

@ -97,13 +97,14 @@ class OmgwtfnzbsProvider(generic.NZBProvider):
result = None result = None
if url and False is self._init_api(): if url and False is self._init_api():
data = self.get_url(url) data = self.get_url(url, timeout=90)
if data: if not data:
if '</nzb>' not in data or 'seem to be logged in' in data: return result
logger.log(u'Failed nzb data response: %s' % data, logger.DEBUG) if '</nzb>' not in data or 'seem to be logged in' in data:
return result logger.log(u'Failed nzb data response: %s' % data, logger.DEBUG)
result = classes.NZBDataSearchResult(episodes) return result
result.extraInfo += [data] result = classes.NZBDataSearchResult(episodes)
result.extraInfo += [data]
if None is result: if None is result:
result = classes.NZBSearchResult(episodes) result = classes.NZBSearchResult(episodes)