Fix Jackett plugin (#80)

This commit is contained in:
Diego Heras 2019-02-19 23:50:41 +01:00 committed by GitHub
parent 396b78110a
commit 8bd1b7db86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 8 deletions

View File

@ -1,4 +1,4 @@
#VERSION: 3.00
#VERSION: 3.01
# AUTHORS: Diego de las Heras (ngosang@hotmail.es)
# CONTRIBUTORS: ukharley
# hannsen (github.com/hannsen)
@ -137,8 +137,10 @@ class jackett(object):
else:
continue
# try to fix link due to jackett bug
if res['link'].startswith('http://localhost:8081'):
res['link'] = res['link'].replace('http://localhost:8081', self.url)
if res['link'].startswith('http'):
splitter = res['link'].split('/jackett/dl/')
if splitter[0] != self.url:
res['link'] = res['link'].replace(splitter[0], self.url)
res['size'] = result.find('size')
res['size'] = -1 if res['size'] is None else (res['size'].text + ' B')

View File

@ -1,5 +1,5 @@
eztv: 1.01
jackett: 3.00
jackett: 3.01
leetx: 2.00
legittorrents: 2.03
limetorrents: 4.01

View File

@ -1,4 +1,4 @@
#VERSION: 3.00
#VERSION: 3.01
# AUTHORS: Diego de las Heras (ngosang@hotmail.es)
# CONTRIBUTORS: ukharley
# hannsen (github.com/hannsen)
@ -137,8 +137,10 @@ class jackett(object):
else:
continue
# try to fix link due to jackett bug
if res['link'].startswith('http://localhost:8081'):
res['link'] = res['link'].replace('http://localhost:8081', self.url)
if res['link'].startswith('http'):
splitter = res['link'].split('/jackett/dl/')
if splitter[0] != self.url:
res['link'] = res['link'].replace(splitter[0], self.url)
res['size'] = result.find('size')
res['size'] = -1 if res['size'] is None else (res['size'].text + ' B')

View File

@ -1,5 +1,5 @@
eztv: 1.01
jackett: 3.00
jackett: 3.01
leetx: 2.00
legittorrents: 2.03
limetorrents: 4.01