mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-04 10:23:37 +00:00
Improved newznab offset code
This commit is contained in:
parent
ab16430b1a
commit
ba4b408af3
1 changed files with 21 additions and 21 deletions
|
@ -263,16 +263,16 @@ class NewznabProvider(generic.NZBProvider):
|
||||||
params['apikey'] = self.key
|
params['apikey'] = self.key
|
||||||
|
|
||||||
results = []
|
results = []
|
||||||
|
|
||||||
# get and set total items available
|
|
||||||
|
|
||||||
offset = total = 0
|
offset = total = 0
|
||||||
|
|
||||||
while total >= offset:
|
while total >= offset:
|
||||||
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)
|
||||||
|
|
||||||
if data and 'entries' in data and self._checkAuthFromData(data):
|
if not data or not self._checkAuthFromData(data):
|
||||||
|
break
|
||||||
|
|
||||||
for item in data.entries:
|
for item in data.entries:
|
||||||
|
|
||||||
(title, url) = self._get_title_and_url(item)
|
(title, url) = self._get_title_and_url(item)
|
||||||
|
|
Loading…
Reference in a new issue