Fix Installazione Elementum
This commit is contained in:
@@ -15,6 +15,7 @@ kod_setting_file = filetools.join(addon_path,'plugin.video.kod', 'resources', 's
|
||||
|
||||
|
||||
def download(item=None):
|
||||
ret = True
|
||||
|
||||
if filetools.exists(elementum_path):
|
||||
if platformtools.dialog_yesno(config.get_localized_string(70784), config.get_localized_string(70783)):
|
||||
@@ -23,22 +24,31 @@ def download(item=None):
|
||||
for r in required: xbmc.executebuiltin('InstallAddon(' + r + ')', wait=True)
|
||||
setting()
|
||||
platformtools.dialog_ok('Elementum', config.get_localized_string(70783))
|
||||
else:
|
||||
ret = False
|
||||
|
||||
else:
|
||||
if platformtools.dialog_yesno(config.get_localized_string(70784), config.get_localized_string(70782)):
|
||||
pform = get_platform()
|
||||
url = support.match(elementum_url, patronBlock=r'<div class="release-entry">(.*?)<!-- /.release-body -->', patron=r'<a href="([a-zA-Z0-9/\.-]+%s.zip)' % pform).match
|
||||
url = support.match(elementum_url, patron=r'<a href="([a-zA-Z0-9/\.-]+{}.zip)'.format(pform)).match
|
||||
support.info('OS:', pform)
|
||||
support.info('Extract IN:', elementum_path)
|
||||
support.info('URL:', url)
|
||||
if url:
|
||||
downloadtools.downloadfile(host + url, filename)
|
||||
extract()
|
||||
xbmc.sleep(1000)
|
||||
addon_file = filetools.file_open(filetools.join(elementum_path,'addon.xml')).read()
|
||||
required = support.match(addon_file, patron=r'addon="([^"]+)').matches
|
||||
for r in required: xbmc.executebuiltin('InstallAddon(' + r + ')', wait=True)
|
||||
setting()
|
||||
dl = downloadtools.downloadfile(host + url, filename)
|
||||
if dl == None:
|
||||
extract()
|
||||
xbmc.sleep(1000)
|
||||
addon_file = filetools.file_open(filetools.join(elementum_path,'addon.xml')).read()
|
||||
required = support.match(addon_file, patron=r'addon="([^"]+)').matches
|
||||
for r in required: xbmc.executebuiltin('InstallAddon(' + r + ')', wait=True)
|
||||
setting()
|
||||
else:
|
||||
ret = False
|
||||
else:
|
||||
ret = False
|
||||
else:
|
||||
ret = False
|
||||
|
||||
|
||||
def extract():
|
||||
|
||||
Reference in New Issue
Block a user