From 791481214ec1f9fb4ff3ea60753d50655a1dfe16 Mon Sep 17 00:00:00 2001 From: DiMartinoXBMC Date: Sat, 26 Nov 2016 11:17:36 +0300 Subject: [PATCH] check version --- Core.py | 5 +++-- addon.xml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Core.py b/Core.py index c996b67..487c7bc 100644 --- a/Core.py +++ b/Core.py @@ -1410,6 +1410,7 @@ class Core: def playTorrent(self, params={}): torrentUrl = self.__settings__.getSetting("lastTorrent") + #xbmc.executebuiltin('Action(Stop)') self.userStorage(params) if self.torrent_player == '0': from Player import TorrentPlayer @@ -1693,7 +1694,7 @@ class Core: xbmcplugin.endOfDirectory(handle=int(sys.argv[1]), succeeded=True) def context(self, params={}): - if int(self.version_check()[:2]) < 17: + if not self.version_check(): xbmc.executebuiltin("Action(ContextMenu)") sys.exit() else: @@ -1714,7 +1715,7 @@ class Core: (sys.argv[0], 'downloadFilesList', params['url'])) def version_check(self): - return xbmc.getInfoLabel( "System.BuildVersion" ) + return False if int(xbmc.getInfoLabel( "System.BuildVersion" )[:2]) < 17 else True def downloadFilesList(self, params={}): from resources.utorrent.net import Download diff --git a/addon.xml b/addon.xml index 64af85d..eb5e848 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@  - +