Merge branch 'master' into develop

This commit is contained in:
JackDandy 2018-03-12 21:29:10 +00:00
commit f1768f68e8
4 changed files with 29 additions and 1 deletions

View file

@ -112,6 +112,12 @@
* Fix Trakt, recommended and watchlist (send_oauth is now sent)
### 0.14.7 (2018-03-12 21:30:00 UTC)
Add DrunkenSlug usenet provider
Fix PiSexy torrent provider
### 0.14.6 (2018-03-05 15:40:00 UTC)
Fix config/notifications Trakt "inactive" status not displayed when it should be

Binary file not shown.

After

Width:  |  Height:  |  Size: 890 B

View file

@ -252,6 +252,7 @@ def getDefaultNewznabProviders():
return '!!!'.join(['Sick Beard Index|http://lolo.sickbeard.com/|0|5030,5040|0|eponly|0|0|0',
'NZBgeek|https://api.nzbgeek.info/||5030,5040|0|eponly|0|0|0',
'NZBs.org|https://nzbs.org/||5030,5040|0|eponly|0|0|0',
'DrunkenSlug|https://api.drunkenslug.com/||5030,5040|0|eponly|0|0|0',
])

View file

@ -51,7 +51,7 @@ class PiSexyProvider(generic.TorrentProvider):
items = {'Cache': [], 'Season': [], 'Episode': [], 'Propers': []}
rc = dict((k, re.compile('(?i)' + v)) for (k, v) in {
'info': 'download', 'get': 'download', 'valid_cat': 'cat=(?:0|50[12])', 'filter': 'free',
'info': 'download', 'get': 'info.php\?id', 'valid_cat': 'cat=(?:0|50[12])', 'filter': 'free',
'title': r'Download\s([^\s]+).*', 'seeders': r'(^\d+)', 'leechers': r'(\d+)$'}.items())
for mode in search_params.keys():
for search_string in search_params[mode]:
@ -109,5 +109,26 @@ class PiSexyProvider(generic.TorrentProvider):
return results
def get_data(self, url):
result = None
html = self.get_url(url, timeout=90)
if self.should_skip():
return result
try:
result = self._link(re.findall('(?i)"([^"]*?download\.php[^"]+?&(?!pimp)[^"]*)"', html)[0])
except IndexError:
logger.log('Failed no torrent in response', logger.DEBUG)
return result
def get_result(self, episodes, url):
result = None
if url:
result = super(PiSexyProvider, self).get_result(episodes, url)
result.get_data_func = self.get_data
return result
provider = PiSexyProvider()