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():
|
||||
|
||||
@@ -1480,8 +1480,11 @@ def play_torrent(item, xlistitem, mediaurl):
|
||||
torrent_options = torrent_client_installed(show_tuple=True)
|
||||
if len(torrent_options) == 0:
|
||||
from platformcode import elementum_download
|
||||
elementum_download.download()
|
||||
return play_torrent(item, xlistitem, mediaurl)
|
||||
install = elementum_download.download()
|
||||
if install:
|
||||
return play_torrent(item, xlistitem, mediaurl)
|
||||
else:
|
||||
selection = -1
|
||||
elif len(torrent_options) > 1:
|
||||
selection = dialog_select(config.get_localized_string(70193), [opcion[0] for opcion in torrent_options])
|
||||
else:
|
||||
|
||||
@@ -22,10 +22,11 @@ def test_video_exists(page_url):
|
||||
|
||||
# Returns an array of possible video url's from the page_url
|
||||
def get_video_url(page_url, premium=False, user='', password='', video_password=''):
|
||||
torrent_options = platformtools.torrent_client_installed(show_tuple=True)
|
||||
if len(torrent_options) == 0:
|
||||
from platformcode import elementum_download
|
||||
elementum_download.download()
|
||||
# torrent_options = platformtools.torrent_client_installed(show_tuple=True)
|
||||
# if len(torrent_options) == 0:
|
||||
# from platformcode import elementum_download
|
||||
# if not elementum_download.download():
|
||||
# return []
|
||||
info('server=torrent, the url is the good')
|
||||
|
||||
if page_url.startswith('magnet:'):
|
||||
|
||||
Reference in New Issue
Block a user