1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-26 01:26:50 +00:00

FIX:(#813) Received index out of Range when searching for an issue with KAT as a provider

This commit is contained in:
evilhero 2014-09-05 02:19:26 -04:00
parent a26f761334
commit 2173614836

View file

@ -84,12 +84,12 @@ def torrents(pickfeed=None,seriesname=None,issue=None):
loopit = 1 loopit = 1
lp = 0 lp = 0
totalcount = 0
title = [] title = []
link = [] link = []
description = [] description = []
seriestitle = [] seriestitle = []
i = 0
feeddata = [] feeddata = []
myDB = db.DBConnection() myDB = db.DBConnection()
@ -139,6 +139,8 @@ def torrents(pickfeed=None,seriesname=None,issue=None):
elif pickfeed == "1" or pickfeed == "4": elif pickfeed == "1" or pickfeed == "4":
picksite = 'CBT' picksite = 'CBT'
i = 0
for entry in feedme['entries']: for entry in feedme['entries']:
if pickfeed == "3" or pickfeed == "6": if pickfeed == "3" or pickfeed == "6":
tmpsz = feedme.entries[i].enclosures[0] tmpsz = feedme.entries[i].enclosures[0]
@ -229,11 +231,13 @@ def torrents(pickfeed=None,seriesname=None,issue=None):
logger.fdebug('[' + picksite + '] there were ' + str(i) + ' results..') logger.fdebug('[' + picksite + '] there were ' + str(i) + ' results..')
else: else:
logger.fdebug('[' + picksite + '] there were ' + str(i) + ' results ' + feedtype) logger.fdebug('[' + picksite + '] there were ' + str(i) + ' results ' + feedtype)
totalcount += i
lp +=1 lp +=1
if not seriesname: if not seriesname:
rssdbupdate(feeddata,i,'torrent') rssdbupdate(feeddata,totalcount,'torrent')
else: else:
katinfo['entries'] = torthekat katinfo['entries'] = torthekat
return katinfo return katinfo