diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 1bf5c46..b04c831 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,10 +1,9 @@ - + - - + @@ -34,72 +33,17 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - @@ -221,127 +165,71 @@ + + - - - - + + + + - - - - - - - - - - - + - - + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -354,7 +242,7 @@ - + @@ -382,35 +270,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -456,21 +320,45 @@ - - + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + @@ -486,6 +374,16 @@ + + + + + + + + + + @@ -508,26 +406,9 @@ @@ -890,42 +788,6 @@ @@ -1195,9 +1093,8 @@ - - + @@ -1207,10 +1104,11 @@ - + + - + @@ -1225,9 +1123,6 @@ - - - @@ -1250,141 +1145,18 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1413,13 +1185,6 @@ - - - - - - - @@ -1427,13 +1192,6 @@ - - - - - - - @@ -1462,13 +1220,6 @@ - - - - - - - @@ -1476,22 +1227,6 @@ - - - - - - - - - - - - - - - - @@ -1499,39 +1234,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1551,51 +1253,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1606,21 +1263,6 @@ - - - - - - - - - - - - - - - @@ -1628,68 +1270,38 @@ - + - - - - + - + - - - - + - + - - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - + + - + @@ -1734,87 +1346,187 @@ - + - - - - - - - - - - - - - - - - - - - - - + + - + - - - + + - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - @@ -1936,15 +1648,137 @@ + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Anteoloader.py b/Anteoloader.py index a2c60eb..444b1b5 100644 --- a/Anteoloader.py +++ b/Anteoloader.py @@ -386,6 +386,7 @@ class AnteoPlayer(xbmc.Player): dht_routers = ["router.bittorrent.com:6881","router.utorrent.com:6881"] user_agent = 'uTorrent/2200(24683)' self.pre_buffer_bytes = int(self.__settings__.getSetting("pre_buffer_bytes"))*1024*1024 + showMessage('[%sPlayer v%s] ' % (author, __version__), self.localize('Please Wait')) self.engine = Engine(uri=file_url(self.torrentUrl), download_path=self.userStorageDirectory, connections_limit=connections_limit, download_kbps=download_limit, upload_kbps=upload_limit, @@ -520,7 +521,7 @@ class AnteoPlayer(xbmc.Player): xbmc.sleep(2000) # very important, do not edit this, podavan i = 0 - while not xbmc.abortRequested and not self.isPlaying() and i < 50: + while not xbmc.abortRequested and not self.isPlaying() and i < 150: xbmc.sleep(200) i += 1 diff --git a/Core.py b/Core.py index 552c0cd..19d1678 100644 --- a/Core.py +++ b/Core.py @@ -1129,6 +1129,7 @@ class Core: listitem.setInfo(type='Video', infoLabels=info) else: listitem.setInfo(type='Video', infoLabels=info) + listitem.setArt({'thumb': image}) xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=url, listitem=listitem, isFolder=isFolder) def getParameters(self, parameterString): @@ -1355,49 +1356,7 @@ class Core: % ('torrentPlayer', url)) return if url: - self.__settings__.setSetting("lastTorrentUrl", url) - torrent = Downloader.Torrent(self.userStorageDirectory, torrentFilesDirectory=self.torrentFilesDirectory) - self.__settings__.setSetting("lastTorrent", torrent.saveTorrent(url)) - - self.drawFolder(torrent, tdir, url, 'torrentPlayer') - - #contentList = [] - #for filedict in torrent.getContentList(): - # fileTitle = filedict.get('title') - # size = filedict.get('size') - # if size: - # fileTitle += ' [%d MB]' % (size / 1024 / 1024) - # contentList.append((unescape(fileTitle), str(filedict.get('ind')), size)) - - #contentList = sorted(contentList, key=lambda x: x[0]) - ##print str(contentList) - - #dirList, contentListNew = cutFolder(contentList, tdir) - - #for title in dirList: - # self.drawItem(title, 'openTorrent', url, isFolder=True, action2=title) - - #ids_video_result = get_ids_video(contentListNew) - #ids_video='' - - #if len(ids_video_result)>0: - # for identifier in ids_video_result: - # ids_video = ids_video + str(identifier) + ',' - - #for title, identifier, filesize in contentListNew: - # contextMenu = [ - # (self.localize('Download via T-client'), - # 'XBMC.RunPlugin(%s)' % ('%s?action=%s&ind=%s') % ( - # sys.argv[0], 'downloadFilesList', str(identifier))), - # (self.localize('Download via Libtorrent'), - # 'XBMC.RunPlugin(%s)' % ('%s?action=%s&ind=%s') % ( - # sys.argv[0], 'downloadLibtorrent', str(identifier))), - # ] - # self.drawItem(title, 'playTorrent', identifier, isFolder=False, action2=ids_video.rstrip(','), - # contextMenu=contextMenu, replaceMenu=False, fileSize=filesize) - #view_style('torrentPlayer') - - #xbmcplugin.endOfDirectory(handle=int(sys.argv[1]), succeeded=True) + self.openTorrent(params) def userStorage(self, params): save=False @@ -1493,7 +1452,7 @@ class Core: def openTorrent(self, params={}): get = params.get tdir = unquote(get("url2"),None) - thumbnail = unquote(get("thumbnail"),'') + thumbnail = unquote(get("thumbnail"), False) and True or 'DefaultVideo.png' save_folder = unquote(get("save_folder"),'') url = urllib.unquote_plus(get("url")) @@ -1525,7 +1484,7 @@ class Core: dirList, contentListNew = cutFolder(contentList, tdir) for title in dirList: - self.drawItem(title, 'openTorrent', url, image=thumbnail, isFolder=True, action2=title) + self.drawItem(title, 'openTorrent', url, isFolder=True, action2=title) ids_video_result = get_ids_video(contentListNew) ids_video='' diff --git a/SearcherABC.py b/SearcherABC.py index 1e4a432..2d0a4c9 100644 --- a/SearcherABC.py +++ b/SearcherABC.py @@ -254,4 +254,9 @@ class SearcherABC: status = str(r1.status) + " " + r1.reason content = r1.read() self.debug('[open2] status:'+str(status)) - return content \ No newline at end of file + return content + + def showMessage(self, heading, message, times=10000): + xbmc.executebuiltin('XBMC.Notification("%s", "%s", %s, "%s")' % ( + heading.replace('"', "'"), message.replace('"', "'"), times, self.searchIcon)) + self.log(str((heading.replace('"', "'"), message.replace('"', "'"), times, self.searchIcon))) \ No newline at end of file diff --git a/addon.xml b/addon.xml index 6231ca4..0b6bcf2 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@  - + diff --git a/resources/language/English/strings.xml b/resources/language/English/strings.xml index da2da48..f76c42b 100644 --- a/resources/language/English/strings.xml +++ b/resources/language/English/strings.xml @@ -3,7 +3,7 @@ Interface Language Lock Folders View Style Off - Save Files To Folder + Save Files To Folder (not FAT32) Use magnet-links Keep downloaded files Keep seeding of downloaded files diff --git a/resources/language/Russian/strings.xml b/resources/language/Russian/strings.xml index 3bd940f..a4351d8 100644 --- a/resources/language/Russian/strings.xml +++ b/resources/language/Russian/strings.xml @@ -3,7 +3,7 @@ Язык интерфейса Удерживать стиль отображения Отключено - Сохранять файлы в директорию + Сохранять файлы в директорию (не FAT32) Использовать магнет-ссылки Хранить загруженные файлы Оставаться на раздаче скачанных файлов