Fix Torrenting provider.

This commit is contained in:
JackDandy 2016-03-06 12:31:38 +00:00
parent 7754c195ac
commit 53e998b242
2 changed files with 19 additions and 2 deletions

View file

@ -1,4 +1,9 @@
### 0.11.6 (2016-02-18 23:10:00 UTC)
### 0.11.7 (2016-03-06 12:30:00 UTC)
* Fix Torrenting provider
### 0.11.6 (2016-02-18 23:10:00 UTC)
* Fix saving config General/Interface/Date style (save again to repopulate blank dates on the Showlist view)

View file

@ -42,9 +42,16 @@ class TorrentingProvider(generic.TorrentProvider):
self.url = self.urls['config_provider_home_uri']
self.username, self.password, self.minseed, self.minleech = 4 * [None]
self.digest, self.minseed, self.minleech = 3 * [None]
self.cache = TorrentingCache(self)
def _authorised(self, **kwargs):
return super(TorrentingProvider, self)._authorised(
logged_in=(lambda x=None: (None is x or 'Other Links' in x) and self.has_all_cookies() and
self.session.cookies['uid'] in self.digest and self.session.cookies['pass'] in self.digest),
failed_msg=(lambda x=None: u'Invalid cookie details for %s. Check settings'))
def _search_provider(self, search_params, **kwargs):
results = []
@ -104,6 +111,11 @@ class TorrentingProvider(generic.TorrentProvider):
return results
@staticmethod
def ui_string(key):
return 'torrenting_digest' == key and 'use... \'uid=xx; pass=yy\'' or ''
class TorrentingCache(tvcache.TVCache):