diff --git a/CHANGES.md b/CHANGES.md index 86ac3700..15ce2f7b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,10 @@ -### 0.12.10 (2017-03-12 16:00:00 UTC) +### 0.12.11 (2017-03-17 02:00:00 UTC) + +* Change SpeedCD to cookie auth as username/password is not reliable +* Change Usenet-Crawler media provider icon + + +### 0.12.10 (2017-03-12 16:00:00 UTC) * Change refactor client for Deluge 1.3.14 compatibility * Change ensure IPT authentication is valid before use diff --git a/gui/slick/images/providers/usenet_crawler.png b/gui/slick/images/providers/usenet_crawler.png index 5c48557d..a9db1287 100644 Binary files a/gui/slick/images/providers/usenet_crawler.png and b/gui/slick/images/providers/usenet_crawler.png differ diff --git a/sickbeard/providers/generic.py b/sickbeard/providers/generic.py index 540272ed..2cd2cd37 100644 --- a/sickbeard/providers/generic.py +++ b/sickbeard/providers/generic.py @@ -646,7 +646,7 @@ class GenericProvider: if hasattr(self, 'cookies'): cookies = self.cookies - if not (cookies and re.match('^(\w+=\w+[;\s]*)+$', cookies)): + if not (cookies and re.match('^(?:\w+=[^;\s]+[;\s]*)+$', cookies)): return False cj = requests.utils.add_dict_to_cookiejar(self.session.cookies, diff --git a/sickbeard/providers/speedcd.py b/sickbeard/providers/speedcd.py index 0da4904e..f09a259f 100644 --- a/sickbeard/providers/speedcd.py +++ b/sickbeard/providers/speedcd.py @@ -30,7 +30,7 @@ class SpeedCDProvider(generic.TorrentProvider): self.url_base = 'https://speed.cd/' self.urls = {'config_provider_home_uri': self.url_base, - 'login_action': self.url_base + 'login.php', + 'login': self.url_base + 'rss.php', 'search': self.url_base + 'V3/API/API.php', 'get': self.url_base + '%s'} @@ -39,12 +39,15 @@ class SpeedCDProvider(generic.TorrentProvider): self.url = self.urls['config_provider_home_uri'] - self.username, self.password, self.freeleech, self.minseed, self.minleech = 5 * [None] + self.digest, self.freeleech, self.minseed, self.minleech = 4 * [None] def _authorised(self, **kwargs): return super(SpeedCDProvider, self)._authorised( - logged_in=(lambda y=None: self.has_all_cookies('inSpeed_speedian'))) + logged_in=(lambda y='': all( + ['RSS' in y, 'type="password"' not in y, self.has_all_cookies(['uid', 'speedian'], 'inSpeed_')] + + [(self.session.cookies.get('inSpeed_' + x) or 'sg!no!pw') in self.digest for x in 'uid', 'speedian'])), + failed_msg=(lambda y=None: u'Invalid cookie details for %s. Check settings')) def _search_provider(self, search_params, **kwargs): @@ -115,5 +118,10 @@ class SpeedCDProvider(generic.TorrentProvider): return generic.TorrentProvider._episode_strings(self, ep_obj, sep_date='.', **kwargs) + @staticmethod + def ui_string(key): + + return 'speedcd_digest' == key and 'use... \'inSpeed_uid=xx; inSpeed_speedian=yy\'' or '' + provider = SpeedCDProvider()