From 66bc7eb781a28e429d626154941afd91a917f6b2 Mon Sep 17 00:00:00 2001 From: kolosovski Date: Sun, 27 Nov 2016 22:07:07 +0200 Subject: [PATCH] Kodi crash on launching play a file inside .torrent file torrenter didn't refresh "lastTorrent" and "lastTorrentUrl" settings after opening a torrent file. Due to this, after choosing a file to play inside torrent file, kodi restarted, because it couldn't play a file with index we have just chosen in a torrent file it remembered last time these settings were saved. --- Core.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Core.py b/Core.py index f9a16dd..e4a2a7e 100644 --- a/Core.py +++ b/Core.py @@ -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'