Fix SpeedCD.

This commit is contained in:
JackDandy 2018-05-14 01:21:43 +01:00
parent e35375f5ef
commit 366c5ed745
3 changed files with 3 additions and 5 deletions

View file

@ -3,6 +3,7 @@
* Change improve tolerance to parse a release title with a badly placed episode name
* Change improve handling tvdb_api data when adding upcoming shows with unfilled data
* Change search only once per cycle for shows with multiple episodes that air on the same day
* Fix SpeedCD
### 0.16.5 (2018-05-07 21:15:00 UTC)

View file

@ -1585,7 +1585,7 @@ class TorrentProvider(GenericProvider):
if not url:
return super(TorrentProvider, self)._authorised()
if getattr(self, 'username', None) and getattr(self, 'password', None):
if getattr(self, 'username', None) and getattr(self, 'password', None) and post_params.pop('login', True):
if not post_params:
post_params = dict(username=self.username, password=self.password)
elif isinstance(post_params, type({})):

View file

@ -56,11 +56,8 @@ class SpeedCDProvider(generic.TorrentProvider):
self.session.cookies.clear('.speed.cd') is None or True] +
['RSS' in y, 'type="password"' not in y, self.has_all_cookies(['speedian'], 'inSpeed_')] +
[(self.session.cookies.get('inSpeed_' + c) or 'sg!no!pw') in self.digest for c in ['speedian']])),
failed_msg=(lambda y=None: None))
username = self.username
del self.username
failed_msg=(lambda y=None: None), post_params={'login': False})
result = super(SpeedCDProvider, self)._authorised(**params)
setattr(self, 'username', username)
if not result and not self.failure_count:
if self.digest: