return to kostil
parent
01f94d009d
commit
73add38efc
20
Core.py
20
Core.py
|
@ -1547,7 +1547,7 @@ class Core:
|
||||||
xbmc.executebuiltin('xbmc.Playlist.Clear')
|
xbmc.executebuiltin('xbmc.Playlist.Clear')
|
||||||
url = unquote(get("url"), None)
|
url = unquote(get("url"), None)
|
||||||
url2 = unquote(get("url2"), None)
|
url2 = unquote(get("url2"), None)
|
||||||
fileIndex = unquote(get("index"), None)
|
index = unquote(get("index"), None)
|
||||||
if url:
|
if url:
|
||||||
self.__settings__.setSetting("lastTorrentUrl", url)
|
self.__settings__.setSetting("lastTorrentUrl", url)
|
||||||
classMatch = re.search('(\w+)::(.+)', url)
|
classMatch = re.search('(\w+)::(.+)', url)
|
||||||
|
@ -1557,12 +1557,18 @@ class Core:
|
||||||
torrent = Downloader.Torrent(self.userStorageDirectory, torrentFilesDirectory=self.torrentFilesDirectory)
|
torrent = Downloader.Torrent(self.userStorageDirectory, torrentFilesDirectory=self.torrentFilesDirectory)
|
||||||
filename = torrent.saveTorrent(url)
|
filename = torrent.saveTorrent(url)
|
||||||
self.__settings__.setSetting("lastTorrent", filename)
|
self.__settings__.setSetting("lastTorrent", filename)
|
||||||
if fileIndex == None: fileIndex = chooseFile(torrent.getContentList())
|
if index == None: index = chooseFile(torrent.getContentList())
|
||||||
if fileIndex:
|
if index:
|
||||||
params = {'url': fileIndex, 'filename': filename}
|
#params = {'url': index, 'filename': filename}
|
||||||
if url2: params['url2'] = url2
|
#if url2: params['url2'] = url2
|
||||||
self.playTorrent(params)
|
#self.playTorrent(params)
|
||||||
#xbmc.executebuiltin('xbmc.RunPlugin("plugin://plugin.video.torrenter/?action=playTorrent&url=%s' % (fileIndex))
|
|
||||||
|
url = 'plugin://plugin.video.torrenter/?action=playTorrent'
|
||||||
|
url += '&url=%s' % (str(index))
|
||||||
|
if url2: url += '&url2=%s' % (url2)
|
||||||
|
if filename: url += '&filename=%s' % (urllib.quote_plus(ensure_str(filename)))
|
||||||
|
|
||||||
|
xbmc.executebuiltin('xbmc.RunPlugin("%s")' % (url))
|
||||||
|
|
||||||
def openTorrent(self, params={}):
|
def openTorrent(self, params={}):
|
||||||
get = params.get
|
get = params.get
|
||||||
|
|
Loading…
Reference in New Issue