piratefix

pull/1/head
DiMartinoXBMC 2015-02-10 18:05:52 +03:00
parent 08b75b092b
commit b5d481992c
3 changed files with 8 additions and 8 deletions

View File

@ -883,7 +883,11 @@ class Core:
label = info.get('label').encode('utf-8', 'ignore') label = info.get('label').encode('utf-8', 'ignore')
if self.contenterObject[provider].isInfoLink() and info.get('link'): if self.contenterObject[provider].isInfoLink() and info.get('link'):
link = {'url': '%s::%s' % (provider, info.get('link')), 'thumbnail': img} if isinstance(info.get('link'), tuple):
url=info.get('link')[0]
else:
url=info.get('link')
link = {'url': '%s::%s' % (provider, url), 'thumbnail': img}
elif self.contenterObject[provider].isLabel(): elif self.contenterObject[provider].isLabel():
link = {'url': '%s::%s' % (provider, urllib.quote_plus(label)), 'thumbnail': img} link = {'url': '%s::%s' % (provider, urllib.quote_plus(label)), 'thumbnail': img}

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.torrenter" name="Torrenter" version="2.1.7" provider-name="vadim.skorba, DiMartino"> <addon id="plugin.video.torrenter" name="Torrenter" version="2.1.8" provider-name="vadim.skorba, DiMartino">
<requires> <requires>
<import addon="xbmc.python" version="2.1.0"/> <import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.libtorrent"/> <import addon="script.module.libtorrent"/>

View File

@ -55,7 +55,7 @@ class ThePirateBaySe(Content.Content):
return False return False
def isInfoLink(self): def isInfoLink(self):
return False return True
def isPages(self): def isPages(self):
return True return True
@ -69,7 +69,6 @@ class ThePirateBaySe(Content.Content):
def get_contentList(self, category, subcategory=None, apps_property=None): def get_contentList(self, category, subcategory=None, apps_property=None):
contentList = [] contentList = []
url = self.get_url(category, subcategory, apps_property) url = self.get_url(category, subcategory, apps_property)
print str(url)
response = self.makeRequest(url, headers=self.headers) response = self.makeRequest(url, headers=self.headers)
@ -87,11 +86,9 @@ class ThePirateBaySe(Content.Content):
result = re.compile( result = re.compile(
r'''<div class="detName">.+?">(.+?)</a>.+?<a href="(.+?)".+?<font class="detDesc">Uploaded (.+?), Size (.+?), .+?</font>.+?<td align="right">(\d+?)</td>.+?<td align="right">(\d+?)</td>''', r'''<div class="detName">.+?">(.+?)</a>.+?<a href="(.+?)".+?<font class="detDesc">Uploaded (.+?), Size (.+?), .+?</font>.+?<td align="right">(\d+?)</td>.+?<td align="right">(\d+?)</td>''',
re.DOTALL).findall(response) re.DOTALL).findall(response)
for (title, link, date, size, seeds, leechers) in result: for title, link, date, size, seeds, leechers in result:
info = {} info = {}
num = num - 1 num = num - 1
if not re.match('^https?\://.+', link) and not re.match('^magnet\:.+', link):
link = re.search('^(https?\://.+?)/.+', self.baseurl).group(1) + link
original_title = None original_title = None
year = 0 year = 0
img = '' img = ''
@ -103,7 +100,6 @@ class ThePirateBaySe(Content.Content):
info['label'] = info['title'] = self.unescape(title) info['label'] = info['title'] = self.unescape(title)
info['link'] = link info['link'] = link
info['plot'] = info['title']+'\r\n[I](%s) [S/L: %s/%s] [/I]\r\n%s' % (size, seeds, leechers, date) info['plot'] = info['title']+'\r\n[I](%s) [S/L: %s/%s] [/I]\r\n%s' % (size, seeds, leechers, date)
contentList.append(( contentList.append((
int(int(self.sourceWeight) * (int(num))), int(int(self.sourceWeight) * (int(num))),
original_title, title, int(year), img, info, original_title, title, int(year), img, info,