Merge pull request #62 from kolosovski/crash_on_play_fix

Kodi crash on launching play a file inside .torrent file
pull/15/head
DiMartinoXBMC 2016-11-28 00:12:49 +03:00 committed by GitHub
commit d959dba7ef
1 changed files with 3 additions and 0 deletions

View File

@ -1379,6 +1379,9 @@ class Core:
if not url:
action = xbmcgui.Dialog()
url = action.browse(1, self.localize('Choose .torrent in video library'), 'video', '.torrent')
torrent = Downloader.Torrent(self.userStorageDirectory, torrentFilesDirectory=self.torrentFilesDirectory)
self.__settings__.setSetting("lastTorrent", torrent.saveTorrent(url))
self.__settings__.setSetting("lastTorrentUrl", url)
if url:
xbmc.executebuiltin(
'XBMC.ActivateWindow(%s)' % 'Videos,plugin://plugin.video.torrenter/?action=%s&url=%s'