version exist check
parent
0c73fb213b
commit
cf59e68b50
|
@ -1,5 +1,5 @@
|
||||||
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
|
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
|
||||||
<addon id='script.module.libtorrent' version='0.16.19f' name='LibTorrent' provider-name='DiMartino, srg70, RussakHH, aisman'>
|
<addon id='script.module.libtorrent' version='0.16.19h' name='LibTorrent' provider-name='DiMartino, srg70, RussakHH, aisman'>
|
||||||
<requires>
|
<requires>
|
||||||
<import addon='xbmc.python' version='2.1.0'/>
|
<import addon='xbmc.python' version='2.1.0'/>
|
||||||
</requires>
|
</requires>
|
||||||
|
|
|
@ -17,9 +17,8 @@ __language__ = __settings__.getLocalizedString
|
||||||
libtorrent=None
|
libtorrent=None
|
||||||
platform = get_platform()
|
platform = get_platform()
|
||||||
set_dirname=__settings__.getSetting('dirname')
|
set_dirname=__settings__.getSetting('dirname')
|
||||||
log('set_dirname:' +str(set_dirname))
|
|
||||||
if getSettingAsBool('custom_dirname') and set_dirname:
|
if getSettingAsBool('custom_dirname') and set_dirname:
|
||||||
|
log('set_dirname:' +str(set_dirname))
|
||||||
dirname=set_dirname
|
dirname=set_dirname
|
||||||
else:
|
else:
|
||||||
dirname = os.path.join(xbmc.translatePath('special://temp'), 'xbmcup', 'script.module.libtorrent',
|
dirname = os.path.join(xbmc.translatePath('special://temp'), 'xbmcup', 'script.module.libtorrent',
|
||||||
|
@ -27,13 +26,18 @@ else:
|
||||||
|
|
||||||
log('dirname:' +str(dirname))
|
log('dirname:' +str(dirname))
|
||||||
|
|
||||||
default_version=0 #0.16.19
|
default_version = 0 #[0.16.19, 1.0.6]
|
||||||
set_version = __settings__.getSetting('set_version')
|
set_version = __settings__.getSetting('set_version')
|
||||||
|
default_path = __language__(1150+default_version)
|
||||||
if getSettingAsBool('custom_version'):
|
if getSettingAsBool('custom_version'):
|
||||||
|
log('set_version:' +str(set_version)+' '+__language__(1150+int(set_version)))
|
||||||
platform['version'] = __language__(1150+int(set_version))
|
platform['version'] = __language__(1150+int(set_version))
|
||||||
else:
|
else:
|
||||||
platform['version'] = __language__(1150+default_version)
|
platform['version'] = default_path
|
||||||
|
|
||||||
|
if not os.path.exists(os.path.join(os.path.dirname(__file__), platform['system'], platform['version'])):
|
||||||
|
log('set_version: back to default '+default_path)
|
||||||
|
platform['version'] = default_path
|
||||||
dest_path = os.path.join(dirname, platform['system'], platform['version'])
|
dest_path = os.path.join(dirname, platform['system'], platform['version'])
|
||||||
sys.path.insert(0, dest_path)
|
sys.path.insert(0, dest_path)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue