From 3ea006912d729e0d6df230a3ccdd4194c0be2a3c Mon Sep 17 00:00:00 2001 From: JackDandy Date: Mon, 12 Mar 2018 21:25:24 +0000 Subject: [PATCH] Add DrunkenSlug usenet provider and fix PiSexy torrent provider. --- CHANGES.md | 8 ++++++- gui/slick/images/providers/drunkenslug.png | Bin 0 -> 890 bytes sickbeard/providers/__init__.py | 1 + sickbeard/providers/pisexy.py | 23 ++++++++++++++++++++- 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 gui/slick/images/providers/drunkenslug.png diff --git a/CHANGES.md b/CHANGES.md index 422b54b2..d638efc6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,10 @@ -### 0.14.6 (2018-03-05 15:40:00 UTC) +### 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 Fix saving multiple account "Update collection" selection at config/notifications Trakt diff --git a/gui/slick/images/providers/drunkenslug.png b/gui/slick/images/providers/drunkenslug.png new file mode 100644 index 0000000000000000000000000000000000000000..8099e5b1fb2b359e84b6c0cca51a389940e6876a GIT binary patch literal 890 zcmV-=1BLvFP)#)S)^AlRis7rJpTxU7gELW@gX z2qL~h=|h`{R20M%d{SH63at;4nM`ITbKm!#d(S!7#hB(_{i~0E@e}-?FE6}@+c&S1 zW5<_|RI9a@4AXjoF>Bl~3`a`gMp5*0;JYiH+gmdX7Cm|51pt7)3uu~#*4+GDrCK{X zJ<~c0LWzaB%t4yoa)BmgZoDdlJyTkT2H~qRjJ$F)}k;%o^#|m zhoz{vo7QVML0;Z=LcusCUMvJ-A&ejj2X}cgr6N+Te91Vs|F)O<01U(fi^2x?O zch@H-n|S@q2cWN=c^74;1S#^RFbX$k*p1)D_Z6tO#$lFqP)0yag0jw$1>Jrc?5r#< z9N;g%`sU~dj#Gwhn;3e*n5mJD!SoE2LSs5~ONXQcAOspIP=rIb$VgWj#_oMU+npZz z0}pYMa!PegWg;kYg+c-{r`YX~0+L5bQkvkI;p_pcSFfSH)rSzW51^ihN>_0Xkx_`a zfJy{ZUI3zi23X3pSz)mIfd2O{=MjXb!L$4hrF13`vz7`Kqz}lUk0MYgY6OK4a5}fq zNF)r&_Z9#^oTM1I;U7VieETPRcK%j;2;57c{1mANPLdjRt%#IW-4y@A<$KQ^o9SgE>`N{Ne?zW@OI2lpeMtp;wO QZU6uP07*qoM6N<$f)=`>9RL6T literal 0 HcmV?d00001 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()