check version

pull/15/head
DiMartinoXBMC 2016-11-26 11:17:36 +03:00
parent 0656286fa6
commit 791481214e
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.torrenter" name="Torrenter" version="2.5.4" provider-name="DiMartino">
<addon id="plugin.video.torrenter" name="Torrenter" version="2.5.4a" provider-name="DiMartino">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.libtorrent"/>