pull/1/head
DiMartinoXBMC 2015-03-07 19:03:22 +03:00
parent 8625bad96c
commit fceb98aa89
3 changed files with 31 additions and 4 deletions

View File

@ -166,6 +166,7 @@ class TorrentPlayer(xbmc.Player):
def init(self): def init(self):
self.next_dl = True if self.__settings__.getSetting('next_dl') == 'true' and self.ids_video else False self.next_dl = True if self.__settings__.getSetting('next_dl') == 'true' and self.ids_video else False
print str(self.next_dl)
self.next_contentId = False self.next_contentId = False
self.display_name = '' self.display_name = ''
self.downloadedSize = 0 self.downloadedSize = 0
@ -356,6 +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'
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)
@ -396,14 +398,18 @@ class TorrentPlayer(xbmc.Player):
def get_ids(self): def get_ids(self):
contentList = [] contentList = []
#path=self.torrent.getContentList()[self.contentId]['title']
#print path
for filedict in self.torrent.getContentList(): for filedict in self.torrent.getContentList():
contentList.append((filedict.get('title'), str(filedict.get('ind')))) contentList.append((filedict.get('title'), str(filedict.get('ind'))))
contentList = sorted(contentList, key=lambda x: x[0]) contentList = sorted(contentList, key=lambda x: x[0])
#print str(contentList)
dirList, contentListNew = cutFolder(contentList) #dirList, contentListNew = cutFolder(contentList)
ids_video = [] ids_video = []
for title, identifier in contentListNew: #print str(contentListNew)
for title, identifier in contentList:
try: try:
ext = title.split('.')[-1] ext = title.split('.')[-1]
if ext.lower() in ['avi','mp4','mkv','flv','mov','vob','wmv','ogm','asx','mpg','mpeg','avc','vp3','fli','flc','m4v','iso']: if ext.lower() in ['avi','mp4','mkv','flv','mov','vob','wmv','ogm','asx','mpg','mpeg','avc','vp3','fli','flc','m4v','iso']:
@ -411,4 +417,5 @@ class TorrentPlayer(xbmc.Player):
except: except:
pass pass
#print 'get_ids:'+str(ids_video)
return ids_video return ids_video

View File

@ -25,7 +25,27 @@ class SWESUB(Content.Content):
category_dict = { category_dict = {
'tvshows': ('TV Shows', '/senaste-tv-serier/', {'page': '/senaste-tv-serier/?page=%d', 'tvshows': ('TV Shows', '/senaste-tv-serier/', {'page': '/senaste-tv-serier/?page=%d',
'increase': 1, 'second_page': 2,}), 'increase': 1, 'second_page': 2,}),
'movies': ('Movies', '/filmer/', {'page': '/filmer/?page=%d', 'increase': 1, 'second_page': 2,}), 'movies': ('Movies', '/senaste-filmer/'),#, {'page': '/senaste-filmer/?page=%d', 'increase': 1, 'second_page': 2,}),
'genre': {'genre': 'by Genre',
'action': ('Action', '/action/', {'page': '/action/?page=%d', 'increase': 1, 'second_page': 2,}),
'adventure': ('Adventure', '/aventyr/', {'page': '/aventyr/?page=%d', 'increase': 1, 'second_page': 2,}),
'animation': ('Animation', '/animerat/', {'page': '/animerat/?page=%d', 'increase': 1, 'second_page': 2,}),
'comedy': ('Comedy', '/komedi/', {'page': '/komedi/?page=%d', 'increase': 1, 'second_page': 2,}),
'crime': ('Crime', '/kriminal/', {'page': '/kriminal/?page=%d', 'increase': 1, 'second_page': 2,}),
'documentary': ('Documentary', '/dokumentar/', {'page': '/dokumentar/?page=%d', 'increase': 1, 'second_page': 2,}),
'drama': ('Drama', '/drama/', {'page': '/drama/?page=%d', 'increase': 1, 'second_page': 2,}),
'family': ('Family', '/familj/', {'page': '/familj/?page=%d', 'increase': 1, 'second_page': 2,}),
'fantasy': ('Fantasy', '/fantasy/', {'page': '/fantasy/?page=%d', 'increase': 1, 'second_page': 2,}),
'horror': ('Horror', '/skrack/', {'page': '/skrack/?page=%d', 'increase': 1, 'second_page': 2,}),
'music': ('Music', '/dans/', {'page': '/dans/?page=%d', 'increase': 1, 'second_page': 2,}),
'musical': ('Musical', '/musikal/', {'page': '/musikal/?page=%d', 'increase': 1, 'second_page': 2,}),
'romance': ('Romance', '/romantik/', {'page': '/romantik/?page=%d', 'increase': 1, 'second_page': 2,}),
'sci_fi': ('Sci-Fi', '/sci-fi/', {'page': '/sci-fi/?page=%d', 'increase': 1, 'second_page': 2,}),
'sport': ('Sport', '/sport/', {'page': '/sport/?page=%d', 'increase': 1, 'second_page': 2,}),
'thriller': ('Thriller', '/thriller/', {'page': '/thriller/?page=%d', 'increase': 1, 'second_page': 2,}),
'war': ('War', '/krig/', {'page': '/krig/?page=%d', 'increase': 1, 'second_page': 2,}),
'western': ('Western', '/western/', {'page': '/western/?page=%d', 'increase': 1, 'second_page': 2,}),
}
} }
baseurl = "http://swesub.tv" baseurl = "http://swesub.tv"

View File

@ -54,7 +54,7 @@ class BTDigg(SearcherABC.SearcherABC):
if None != response and 0 < len(response): if None != response and 0 < len(response):
#print response #print response
dat = json.loads(response) dat = json.loads(response)
print str(dat) #print str(dat)
for item in dat: for item in dat:
size = self.sizeConvert(item['size']) size = self.sizeConvert(item['size'])
seeds,leechers=0,0 seeds,leechers=0,0