From 21736148367c9cd3bc67d9927362d80e3e7b5110 Mon Sep 17 00:00:00 2001 From: evilhero Date: Fri, 5 Sep 2014 02:19:26 -0400 Subject: [PATCH] FIX:(#813) Received index out of Range when searching for an issue with KAT as a provider --- mylar/rsscheck.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mylar/rsscheck.py b/mylar/rsscheck.py index 0064f301..975aab18 100755 --- a/mylar/rsscheck.py +++ b/mylar/rsscheck.py @@ -84,12 +84,12 @@ def torrents(pickfeed=None,seriesname=None,issue=None): loopit = 1 lp = 0 + totalcount = 0 title = [] link = [] description = [] seriestitle = [] - i = 0 feeddata = [] myDB = db.DBConnection() @@ -138,6 +138,8 @@ def torrents(pickfeed=None,seriesname=None,issue=None): picksite = 'KAT' elif pickfeed == "1" or pickfeed == "4": picksite = 'CBT' + + i = 0 for entry in feedme['entries']: if pickfeed == "3" or pickfeed == "6": @@ -229,11 +231,13 @@ def torrents(pickfeed=None,seriesname=None,issue=None): logger.fdebug('[' + picksite + '] there were ' + str(i) + ' results..') else: logger.fdebug('[' + picksite + '] there were ' + str(i) + ' results ' + feedtype) + + totalcount += i lp +=1 if not seriesname: - rssdbupdate(feeddata,i,'torrent') + rssdbupdate(feeddata,totalcount,'torrent') else: katinfo['entries'] = torthekat return katinfo