From c4f4cae44030c285b2f70f51c3e4d5875a3aad57 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Mon, 23 Feb 2015 01:54:15 +0000 Subject: [PATCH] Change Wombles to use tv-dvd section. --- CHANGES.md | 3 ++- sickbeard/providers/womble.py | 17 +++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 5db2c01c..4797e458 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,6 @@ ### 0.x.x (2015-xx-xx xx:xx:xx UTC) +* Change Wombles to use tv-dvd section * Add requirements file for pip (port from midgetspy/sick-beard) * Remove unused libraries fuzzywuzzy and pysrt * Change webserve code to a logical layout and PEP8 @@ -102,7 +103,7 @@ * Change SCC URLs to remove redirection overhead * Change TorrentBytes login parameter in line with site change * Change FreshOnTv login parameter and use secure URLs, add logging of Cloudflare blocking and prevent vacant cookie tracebacks -* Change TPB webproxy list and add SSL variants +* Change TPB webproxy list and add SSL variants * Add YTV network logo diff --git a/sickbeard/providers/womble.py b/sickbeard/providers/womble.py index 0991eac3..c55b7bb4 100644 --- a/sickbeard/providers/womble.py +++ b/sickbeard/providers/womble.py @@ -15,14 +15,11 @@ # # You should have received a copy of the GNU General Public License # along with SickGear. If not, see . -import time -import sickbeard import generic from sickbeard import logger from sickbeard import tvcache -from sickbeard.exceptions import AuthException class WombleProvider(generic.NZBProvider): @@ -53,8 +50,11 @@ class WombleCache(tvcache.TVCache): return cl = [] - for url in [self.provider.url + 'rss/?sec=tv-x264&fr=false', self.provider.url + 'rss/?sec=tv-sd&fr=false', self.provider.url + 'rss/?sec=tv-hd&fr=false']: - logger.log(u"Womble's Index cache update URL: " + url, logger.DEBUG) + for url in [self.provider.url + 'rss/?sec=tv-x264&fr=false', + self.provider.url + 'rss/?sec=tv-sd&fr=false', + self.provider.url + 'rss/?sec=tv-dvd&fr=false', + self.provider.url + 'rss/?sec=tv-hd&fr=false']: + logger.log(u'Womble\'s Index cache update URL: ' + url, logger.DEBUG) data = self.getRSSFeed(url) # As long as we got something from the provider we count it as an update @@ -65,10 +65,10 @@ class WombleCache(tvcache.TVCache): for item in data.entries: title, url = self._get_title_and_url(item) ci = self._parseItem(title, url) - if ci is not None: + if None is not ci: cl.append(ci) - if len(cl) > 0: + if 0 < len(cl): myDB = self._getDB() myDB.mass_action(cl) @@ -77,6 +77,7 @@ class WombleCache(tvcache.TVCache): self.setLastUpdate() def _checkAuth(self, data): - return data != 'Invalid Link' + return 'Invalid Link' != data + provider = WombleProvider()