Merge branch 'master' into develop

This commit is contained in:
JackDandy 2017-03-17 01:59:43 +00:00
commit b3f1f256f6
4 changed files with 18 additions and 4 deletions

View file

@ -60,6 +60,12 @@
* Change restart/shutdown to use updated jQuery
### 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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 818 B

After

Width:  |  Height:  |  Size: 381 B

View file

@ -647,7 +647,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,

View file

@ -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()