mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-11 05:33:37 +00:00
Fixes backlog for newznab providers
This commit is contained in:
parent
88479e7e1b
commit
5d1ae90565
1 changed files with 5 additions and 1 deletions
|
@ -259,13 +259,17 @@ class NewznabProvider(generic.NZBProvider):
|
||||||
if search_params:
|
if search_params:
|
||||||
params.update(search_params)
|
params.update(search_params)
|
||||||
|
|
||||||
|
if 'rid' not in search_params and 'q' not in search_params:
|
||||||
|
logger.log("Error no rid or search term given. Report to forums with a full debug log")
|
||||||
|
return []
|
||||||
|
|
||||||
if self.needs_auth and self.key:
|
if self.needs_auth and self.key:
|
||||||
params['apikey'] = self.key
|
params['apikey'] = self.key
|
||||||
|
|
||||||
results = []
|
results = []
|
||||||
offset = total = 0
|
offset = total = 0
|
||||||
|
|
||||||
while total >= (offset or 1000):
|
while (total >= offset) and (offset < 1000):
|
||||||
search_url = self.url + 'api?' + urllib.urlencode(params)
|
search_url = self.url + 'api?' + urllib.urlencode(params)
|
||||||
logger.log(u"Search url: " + search_url, logger.DEBUG)
|
logger.log(u"Search url: " + search_url, logger.DEBUG)
|
||||||
data = self.cache.getRSSFeed(search_url)
|
data = self.cache.getRSSFeed(search_url)
|
||||||
|
|
Loading…
Reference in a new issue