Kodi Community Forum

Full Version: How run script once, after skin installation?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to run script once after installation of the new skin?
I want to run an script to initialize some of skin settings to my defaults....
I found it really hard to go into xml files and change defaults but with running a python script I can easily achieve it....

I found some mentions of startup.xml...but does it only run once by kodi or every time this skin is switched to?
if you want a script to execute once then just "remember" that by setting a script setting.
You can also do that purely with skinning techniques:
Code:
<include name="Initialization">
        <onload>Skin.SetString(xxx,yyyy)</onload>
    ....
        <onload>Skin.SetBool(init)</onload>
+
Code:
<include condition="!Skin.HasSetting(init)">Initialization</include>