From d1135529d1ab3fdedf7133015cae06695e2b099b Mon Sep 17 00:00:00 2001 From: Alhaziel Date: Sat, 21 Mar 2020 17:33:17 +0100 Subject: [PATCH] Fix Settaggio Autostart KoD --- platformcode/config.py | 4 ++-- resources/settings.xml | 2 +- specials/setting.py | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/platformcode/config.py b/platformcode/config.py index c1d13fce..361776b0 100644 --- a/platformcode/config.py +++ b/platformcode/config.py @@ -152,7 +152,7 @@ def enable_disable_autorun(is_enabled): if is_enabled is False: with open(path, append_write) as file: file.write("import xbmc\nxbmc.executebuiltin('XBMC.RunAddon(plugin.video.kod)')") - set_setting('autostart', get_localized_string(707431)) + set_setting('autostart', 'ON') else: file = open(path, "r") old_content = file.read() @@ -160,7 +160,7 @@ def enable_disable_autorun(is_enabled): file.close() with open(path, "w") as file: file.write(new_content) - set_setting('autostart', get_localized_string(707432)) + set_setting('autostart', 'OFF') return True def get_all_settings_addon(): diff --git a/resources/settings.xml b/resources/settings.xml index 799a6c18..232bf67b 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -2,7 +2,7 @@ - + diff --git a/specials/setting.py b/specials/setting.py index 5242dd42..12ee2e3f 100644 --- a/specials/setting.py +++ b/specials/setting.py @@ -100,9 +100,11 @@ def channel_config(item): def autostart(item): # item necessario launcher.py linea 265 if config.enable_disable_autorun(AUTOSTART): - xbmcgui.Dialog().ok(config.get_localized_string(20000), config.get_localized_string(70709)) + logger.info('AUTOSTART ENABLED') + # xbmcgui.Dialog().ok(config.get_localized_string(20000), config.get_localized_string(70709)) else: - xbmcgui.Dialog().ok(config.get_localized_string(20000), config.get_localized_string(70710)) + logger.info('AUTOSTART ENABLED') + # xbmcgui.Dialog().ok(config.get_localized_string(20000), config.get_localized_string(70710)) def setting_torrent(item):