diff --git a/CHANGES.md b/CHANGES.md index 586523ce..1e03e354 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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 diff --git a/gui/slick/images/providers/drunkenslug.png b/gui/slick/images/providers/drunkenslug.png new file mode 100644 index 00000000..8099e5b1 Binary files /dev/null and b/gui/slick/images/providers/drunkenslug.png differ diff --git a/sickbeard/providers/__init__.py b/sickbeard/providers/__init__.py index 77f0abfd..6d580dd7 100755 --- a/sickbeard/providers/__init__.py +++ b/sickbeard/providers/__init__.py @@ -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', ]) diff --git a/sickbeard/providers/pisexy.py b/sickbeard/providers/pisexy.py index 2b4d48b8..7b78a02c 100644 --- a/sickbeard/providers/pisexy.py +++ b/sickbeard/providers/pisexy.py @@ -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()