piratefix
This commit is contained in:
		
							parent
							
								
									08b75b092b
								
							
						
					
					
						commit
						b5d481992c
					
				
							
								
								
									
										6
									
								
								Core.py
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								Core.py
									
									
									
									
									
								
							@ -883,7 +883,11 @@ class Core:
 | 
			
		||||
            label = info.get('label').encode('utf-8', 'ignore')
 | 
			
		||||
 | 
			
		||||
            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():
 | 
			
		||||
                link = {'url': '%s::%s' % (provider, urllib.quote_plus(label)), 'thumbnail': img}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
<?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>
 | 
			
		||||
        <import addon="xbmc.python" version="2.1.0"/>
 | 
			
		||||
        <import addon="script.module.libtorrent"/>
 | 
			
		||||
 | 
			
		||||
@ -55,7 +55,7 @@ class ThePirateBaySe(Content.Content):
 | 
			
		||||
        return False
 | 
			
		||||
 | 
			
		||||
    def isInfoLink(self):
 | 
			
		||||
        return False
 | 
			
		||||
        return True
 | 
			
		||||
 | 
			
		||||
    def isPages(self):
 | 
			
		||||
        return True
 | 
			
		||||
@ -69,7 +69,6 @@ class ThePirateBaySe(Content.Content):
 | 
			
		||||
    def get_contentList(self, category, subcategory=None, apps_property=None):
 | 
			
		||||
        contentList = []
 | 
			
		||||
        url = self.get_url(category, subcategory, apps_property)
 | 
			
		||||
        print str(url)
 | 
			
		||||
 | 
			
		||||
        response = self.makeRequest(url, headers=self.headers)
 | 
			
		||||
 | 
			
		||||
@ -87,11 +86,9 @@ class ThePirateBaySe(Content.Content):
 | 
			
		||||
        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>''',
 | 
			
		||||
                re.DOTALL).findall(response)
 | 
			
		||||
        for (title, link, date, size, seeds, leechers) in result:
 | 
			
		||||
        for title, link, date, size, seeds, leechers in result:
 | 
			
		||||
            info = {}
 | 
			
		||||
            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
 | 
			
		||||
            year = 0
 | 
			
		||||
            img = ''
 | 
			
		||||
@ -103,7 +100,6 @@ class ThePirateBaySe(Content.Content):
 | 
			
		||||
            info['label'] = info['title'] = self.unescape(title)
 | 
			
		||||
            info['link'] = link
 | 
			
		||||
            info['plot'] = info['title']+'\r\n[I](%s) [S/L: %s/%s] [/I]\r\n%s' % (size, seeds, leechers, date)
 | 
			
		||||
 | 
			
		||||
            contentList.append((
 | 
			
		||||
                int(int(self.sourceWeight) * (int(num))),
 | 
			
		||||
                original_title, title, int(year), img, info,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user