pull/1/head
DiMartinoXBMC 2015-03-19 23:09:59 +03:00
parent fceb98aa89
commit 3d727ab559
6 changed files with 16 additions and 16 deletions

View File

@ -126,11 +126,11 @@ class Libtorrent:
print 'Exception: ' + str(e) print 'Exception: ' + str(e)
xbmcvfs.delete(torrentFile) xbmcvfs.delete(torrentFile)
return return
baseName = file_encode(os.path.basename(self.getFilePath())) #baseName = file_encode(os.path.basename(self.getFilePath()))
if not xbmcvfs.exists(self.torrentFilesPath): if not xbmcvfs.exists(self.torrentFilesPath):
xbmcvfs.mkdirs(self.torrentFilesPath) xbmcvfs.mkdirs(self.torrentFilesPath)
newFile = self.torrentFilesPath + baseName + '.' + self.md5(torrentUrl) + '.torrent' newFile = self.torrentFilesPath + self.md5(torrentUrl) + '.torrent'#+ '.'+ baseName
#print newFile
xbmcvfs.delete(newFile) xbmcvfs.delete(newFile)
if not xbmcvfs.exists(newFile): if not xbmcvfs.exists(newFile):
try: try:

View File

@ -357,7 +357,7 @@ class TorrentPlayer(xbmc.Player):
self.next_contentId = int(self.ids_video[next_contentId_index]) self.next_contentId = int(self.ids_video[next_contentId_index])
else: else:
self.next_contentId = False self.next_contentId = False
print str(self.next_contentId)+'xxxxxx23' #print str(self.next_contentId)+'xxxxxx23'
if not self.seeding_run and self.iterator == 100 and self.seeding: if not self.seeding_run and self.iterator == 100 and self.seeding:
self.seeding_run=True self.seeding_run=True
self.seed(self.contentId) self.seed(self.contentId)

View File

@ -23,17 +23,17 @@ import Content
class ThePirateBaySe(Content.Content): class ThePirateBaySe(Content.Content):
category_dict = { category_dict = {
'tvshows': ('TV Shows', '/browse/205', {'page': '/browse/208/%d', 'increase': 1, 'second_page': 1, 'tvshows': ('TV Shows', '/browse/205', {'page': '/browse/208/%d', 'increase': 1, 'second_page': 1,
'sort':[{'name':'by Seeders', 'url_after':'/7'}, 'sort':[{'name':'by Seeders', 'url_after':'/0/7/0'},
{'name':'by Date', 'url_after':'/3'}]}), {'name':'by Date', 'url_after':'/0/3/0'}]}),
'tvshowshd': ('TV Shows [HD]', '/browse/208', {'page': '/browse/208/%d', 'increase': 1, 'second_page': 1, 'tvshowshd': ('TV Shows [HD]', '/browse/208', {'page': '/browse/208/%d', 'increase': 1, 'second_page': 1,
'sort':[{'name':'by Seeders', 'url_after':'/7'}, 'sort':[{'name':'by Seeders', 'url_after':'/0/7/0'},
{'name':'by Date', 'url_after':'/3'}]}), {'name':'by Date', 'url_after':'/0/3/0'}]}),
'movies': ('Movies', '/browse/201', {'page': '/browse/208/%d', 'increase': 1, 'second_page': 1, 'movies': ('Movies', '/browse/201', {'page': '/browse/208/%d', 'increase': 1, 'second_page': 1,
'sort':[{'name':'by Seeders', 'url_after':'/7'}, 'sort':[{'name':'by Seeders', 'url_after':'/0/7/0'},
{'name':'by Date', 'url_after':'/3'}]}), {'name':'by Date', 'url_after':'/0/3/0'}]}),
'movieshd': ('Movies [HD]', '/browse/207', {'page': '/browse/208/%d', 'increase': 1, 'second_page': 1, 'movieshd': ('Movies [HD]', '/browse/207', {'page': '/browse/208/%d', 'increase': 1, 'second_page': 1,
'sort':[{'name':'by Seeders', 'url_after':'/7'}, 'sort':[{'name':'by Seeders', 'url_after':'/0/7/0'},
{'name':'by Date', 'url_after':'/3'}]}), {'name':'by Date', 'url_after':'/0/3/0'}]}),
} }
baseurl = "https://thepiratebay.se" baseurl = "https://thepiratebay.se"

View File

@ -63,7 +63,7 @@ class KickAssSo(SearcherABC.SearcherABC):
def search(self, keyword): def search(self, keyword):
filesList = [] filesList = []
url = "http://kickass.to/usearch/%s/?field=time_add&sorder=desc" % urllib.quote_plus(keyword) url = "http://kickass.to/usearch/%s/?field=seeders&sorder=desc" % urllib.quote_plus(keyword)
headers = [('User-Agent', headers = [('User-Agent',
'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 YaBrowser/14.10.2062.12061 Safari/537.36'), 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 YaBrowser/14.10.2062.12061 Safari/537.36'),
('Referer', 'http://kickass.so/'), ('Accept-encoding', 'gzip'), ] ('Referer', 'http://kickass.so/'), ('Accept-encoding', 'gzip'), ]

View File

@ -159,8 +159,8 @@ class RuTrackerOrg(SearcherABC.SearcherABC):
'(http://static\.rutracker\.org/captcha/\d+/\d+/[0-9a-f]+\.jpg\?\d+).+?name="cap_sid" value="(.+?)".+?name="(cap_code_[0-9a-f]+)"', '(http://static\.rutracker\.org/captcha/\d+/\d+/[0-9a-f]+\.jpg\?\d+).+?name="cap_sid" value="(.+?)".+?name="(cap_code_[0-9a-f]+)"',
re.DOTALL | re.MULTILINE).search(pageContent) re.DOTALL | re.MULTILINE).search(pageContent)
data = { data = {
'login_password': 'torrenter', 'login_password': 'torrenter_plugin',
'login_username': 'torrenter-plugin', 'login_username': 'torrenter_plugin',
'login': '%C2%F5%EE%E4', 'login': '%C2%F5%EE%E4',
'redirect': 'index.php' 'redirect': 'index.php'
} }

View File

@ -80,7 +80,7 @@ class KinoZalTV(SearcherABC.SearcherABC):
for (forum, topic, title, size, seeds, leechers) in re.compile(regex, re.DOTALL).findall(response): for (forum, topic, title, size, seeds, leechers) in re.compile(regex, re.DOTALL).findall(response):
if int(forum) not in bad_forums: if int(forum) not in bad_forums:
image = sys.modules["__main__"].__root__ + self.searchIcon image = sys.modules["__main__"].__root__ + self.searchIcon
link = 'http://kinozal.tv/download.php/' + topic + '/[kinozal.tv]id' + topic + '.torrent' link = 'http://kinozal.tv/download.php?id=' + topic
filesList.append(( filesList.append((
int(int(self.sourceWeight) * int(seeds)), int(int(self.sourceWeight) * int(seeds)),
int(seeds), int(leechers), size, int(seeds), int(leechers), size,