pull/1/head
DiMartinoXBMC 2016-03-06 20:47:38 +03:00
parent f2f8276b9d
commit fa5d8467a7
2 changed files with 19 additions and 15 deletions

View File

@ -54,20 +54,24 @@ if getSettingAsBool('custom_version'):
else:
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)
sizefile_path = os.path.join(os.path.dirname(__file__), platform['system'], platform['version'])
if not os.path.exists(sizefile_path):
log('set_version: no sizefile at %s back to default %s' % (sizefile_path, default_path))
platform['version'] = default_path
if not os.path.exists(os.path.join(os.path.dirname(__file__), platform['system'], platform['version'])):
log('set_version: no default searching for any version')
versions = os.listdir(os.path.join(os.path.dirname(__file__), platform['system'],))
for ver in versions:
if not os.path.isdir(os.path.join(os.path.dirname(__file__), platform['system'],ver)):
versions.remove(ver)
if len(versions)>0:
platform['version'] = versions[-1]
else:
log('die because the folder is empty')
exit()
sizefile_path = os.path.join(os.path.dirname(__file__), platform['system'], platform['version'])
if not os.path.exists(sizefile_path):
log('set_version: no default at %s searching for any version' % sizefile_path)
versions = os.listdir(os.path.join(os.path.dirname(__file__), platform['system']))
for ver in versions:
if not os.path.isdir(os.path.join(os.path.dirname(__file__), platform['system'], ver)):
versions.remove(ver)
if len(versions)>0:
platform['version'] = versions[-1]
log('set_version: chose %s out of %s' % (platform['version'], str(versions)))
else:
log('die because the folder is empty')
exit()
dest_path = os.path.join(dirname, platform['system'], platform['version'])
sys.path.insert(0, dest_path)

View File

@ -23,8 +23,8 @@
<string id="1150">0.16.19</string>
<string id="1151">1.0.6</string>
<string id="1152">1.0.7</string>
<string id="1152">1.0.8</string>
<string id="1152">1.0.9</string>
<string id="1153">1.0.8</string>
<string id="1154">1.0.9</string>
<string id="1010">TS Engine not running!</string>
<string id="1011">No answer</string>