Use xbmc.translatePath on storage setting
Convert special:// path to absolute ones for file operations to work. Fix reference to "path" setting for AceStreampull/15/head
parent
e1360e2b97
commit
09a555df0f
8
Core.py
8
Core.py
|
@ -30,7 +30,7 @@ class Core:
|
||||||
__plugin__ = sys.modules["__main__"].__plugin__
|
__plugin__ = sys.modules["__main__"].__plugin__
|
||||||
__settings__ = sys.modules["__main__"].__settings__
|
__settings__ = sys.modules["__main__"].__settings__
|
||||||
ROOT = sys.modules["__main__"].__root__
|
ROOT = sys.modules["__main__"].__root__
|
||||||
userStorageDirectory = localize_path(__settings__.getSetting("storage"))#file_encode(__settings__.getSetting("storage"))
|
userStorageDirectory = localize_path(xbmc.translatePath(__settings__.getSetting("storage")))#file_encode(__settings__.getSetting("storage"))
|
||||||
torrentFilesDirectory = 'torrents'
|
torrentFilesDirectory = 'torrents'
|
||||||
debug = __settings__.getSetting('debug') == 'true'
|
debug = __settings__.getSetting('debug') == 'true'
|
||||||
torrent_player = __settings__.getSetting("torrent_player")
|
torrent_player = __settings__.getSetting("torrent_player")
|
||||||
|
@ -1455,9 +1455,9 @@ class Core:
|
||||||
#xbmc.executebuiltin('xbmc.RunPlugin("plugin://plugin.video.yatp/?action=play&torrent=%s&file_index=%s")' % (urllib.quote_plus(torrentUrl), params['url']))
|
#xbmc.executebuiltin('xbmc.RunPlugin("plugin://plugin.video.yatp/?action=play&torrent=%s&file_index=%s")' % (urllib.quote_plus(torrentUrl), params['url']))
|
||||||
elif self.torrent_player == '1':
|
elif self.torrent_player == '1':
|
||||||
__ASsettings__ = xbmcaddon.Addon(id='script.module.torrent.ts')
|
__ASsettings__ = xbmcaddon.Addon(id='script.module.torrent.ts')
|
||||||
folder=__ASsettings__.getSetting("folder")
|
folder=__ASsettings__.getSetting("path")
|
||||||
save=__ASsettings__.getSetting("save")
|
save=__ASsettings__.getSetting("save")
|
||||||
__ASsettings__.setSetting("folder", self.__settings__.getSetting("storage"))
|
__ASsettings__.setSetting("path", xbmc.translatePath(self.__settings__.getSetting("storage")))
|
||||||
__ASsettings__.setSetting("save", self.__settings__.getSetting("keep_files"))
|
__ASsettings__.setSetting("save", self.__settings__.getSetting("keep_files"))
|
||||||
xbmc.sleep(1000)
|
xbmc.sleep(1000)
|
||||||
torrent = Downloader.Torrent(self.userStorageDirectory, torrentUrl, self.torrentFilesDirectory)
|
torrent = Downloader.Torrent(self.userStorageDirectory, torrentUrl, self.torrentFilesDirectory)
|
||||||
|
@ -1468,7 +1468,7 @@ class Core:
|
||||||
label = unquote(get("label"), os.path.basename(path))
|
label = unquote(get("label"), os.path.basename(path))
|
||||||
torrent.play_url_ind(int(ind), label, icon)
|
torrent.play_url_ind(int(ind), label, icon)
|
||||||
torrent.__exit__()
|
torrent.__exit__()
|
||||||
__ASsettings__.setSetting("folder", folder)
|
__ASsettings__.setSetting("path", folder)
|
||||||
__ASsettings__.setSetting("save", save)
|
__ASsettings__.setSetting("save", save)
|
||||||
|
|
||||||
def saveUrlTorrent(self, url):
|
def saveUrlTorrent(self, url):
|
||||||
|
|
Loading…
Reference in New Issue