Fix Settaggio Autostart KoD
This commit is contained in:
@@ -152,7 +152,7 @@ def enable_disable_autorun(is_enabled):
|
|||||||
if is_enabled is False:
|
if is_enabled is False:
|
||||||
with open(path, append_write) as file:
|
with open(path, append_write) as file:
|
||||||
file.write("import xbmc\nxbmc.executebuiltin('XBMC.RunAddon(plugin.video.kod)')")
|
file.write("import xbmc\nxbmc.executebuiltin('XBMC.RunAddon(plugin.video.kod)')")
|
||||||
set_setting('autostart', get_localized_string(707431))
|
set_setting('autostart', 'ON')
|
||||||
else:
|
else:
|
||||||
file = open(path, "r")
|
file = open(path, "r")
|
||||||
old_content = file.read()
|
old_content = file.read()
|
||||||
@@ -160,7 +160,7 @@ def enable_disable_autorun(is_enabled):
|
|||||||
file.close()
|
file.close()
|
||||||
with open(path, "w") as file:
|
with open(path, "w") as file:
|
||||||
file.write(new_content)
|
file.write(new_content)
|
||||||
set_setting('autostart', get_localized_string(707432))
|
set_setting('autostart', 'OFF')
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def get_all_settings_addon():
|
def get_all_settings_addon():
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<settings>
|
<settings>
|
||||||
<!-- General -->
|
<!-- General -->
|
||||||
<category label="70168">
|
<category label="70168">
|
||||||
<setting id="autostart" type="action" label="70706" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAiYXV0b3N0YXJ0IiwNCiAgICAiY2hhbm5lbCI6ICJzZXR0aW5nIg0KfQ==)" default="707432"/>
|
<setting id="autostart" type="action" label="70706" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAiYXV0b3N0YXJ0IiwNCiAgICAiY2hhbm5lbCI6ICJzZXR0aW5nIg0KfQ==)" default="OFF"/>
|
||||||
<setting type="sep"/>
|
<setting type="sep"/>
|
||||||
<setting id="thumbnail_type" type="select" lvalues="30011|30012|30200" label="30010" default="2"/>
|
<setting id="thumbnail_type" type="select" lvalues="30011|30012|30200" label="30010" default="2"/>
|
||||||
<setting id="channel_language" type="select" values="auto|all|ita" label="30019" default="all"/>
|
<setting id="channel_language" type="select" values="auto|all|ita" label="30019" default="all"/>
|
||||||
|
|||||||
+4
-2
@@ -100,9 +100,11 @@ def channel_config(item):
|
|||||||
|
|
||||||
def autostart(item): # item necessario launcher.py linea 265
|
def autostart(item): # item necessario launcher.py linea 265
|
||||||
if config.enable_disable_autorun(AUTOSTART):
|
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:
|
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):
|
def setting_torrent(item):
|
||||||
|
|||||||
Reference in New Issue
Block a user