From 852588254a5dc2d87946ffd82a2a29d1bdca83ff Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Fri, 29 Oct 2021 11:40:25 +0200 Subject: [PATCH] Fix Installazione Elementum --- platformcode/elementum_download.py | 26 ++++++++++++++++++-------- platformcode/platformtools.py | 7 +++++-- servers/torrent.py | 9 +++++---- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/platformcode/elementum_download.py b/platformcode/elementum_download.py index 588543fc..4c33967f 100644 --- a/platformcode/elementum_download.py +++ b/platformcode/elementum_download.py @@ -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'
(.*?)', patron=r' 1: selection = dialog_select(config.get_localized_string(70193), [opcion[0] for opcion in torrent_options]) else: diff --git a/servers/torrent.py b/servers/torrent.py index 6947ba2f..6f854287 100755 --- a/servers/torrent.py +++ b/servers/torrent.py @@ -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:'):