Parameters for UnloadSkin() and ReloadSkin()
#1
Hi community,

Can Someone explain to me please, what the parameters are that go inside the the brackets of UnloadSkin() and ReloadSkin()

Thanks
Reply
#2
None.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#3
(2015-06-15, 01:50)phil65 Wrote: None.

brilliant, thanks

So am I right in thinking that it like this...

Code:
xbmc.executebuiltin("UnloadSkin()")

some script to do stuff that cant be done when the skin is in use, then...

xbmc.executebuiltin("ReloadSkin()")

Thanks phil65
Reply
#4
What do you want to do exactly?
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#5
Hi Phil65,

I need to change guisettings.xml but cant whilst the skin is in use.

So when in the script, Im going to unload skin copy new guisettings.xml and reload skin...hopefully
Reply
#6
(2015-06-15, 12:06)myfototv Wrote: Hi Phil65,

I need to change guisettings.xml but cant whilst the skin is in use.

So when in the script, Im going to unload skin copy new guisettings.xml and reload skin...hopefully

...and why do you need to edit GUISettings.xml?
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#7
ok, Im writing a python code.

Code:
import os
import shutil
import time
import xbmcgui
import xbmc

oldxml = xbmc.translatePath('special://home/userdata/guisettings.xml')
newNam = xbmc.translatePath('special://home/userdata/guisettings.xml.old')
newxml = xbmc.translatePath('special://home/userdata/addon_data/plugin.program.super.favourites/Super Favourites/Maintenance/newgui/guisettings.xml')

destLoc = xbmc.translatePath('special://home/userdata/')
sourceLoc = xbmc.translatePath('special://home/userdata/addon_data/plugin.program.super.favourites/Super Favourites/Maintenance/newgui/')

YESNOWINDOW = xbmcgui.Dialog().yesno(
    "Script written by Microwave Chef",
    "This will update your home screen",
    "Your screen will go black and afterwards",
    "Your system will restart, Continue?")
if YESNOWINDOW:
    xbmc.executebuiltin("Notification(PROCEEDING, with update,()")
else:
    xbmc.executebuiltin("Notification(ABORTED, update,()")
    xbmc.executebuiltin("ActivateWindow(10000,return)")

time.sleep(2)

xbmc.executebuiltin("UnloadSkin()")
time.sleep(2)
os.rename(oldxml,newNam)
time.sleep(5)
xbmc.executebuiltin("Notification(OLD file, Renamed correctly,()")
time.sleep(2)
xbmc.executebuiltin("Notification(COPYING NEW, Homescreen Settings,()")
time.sleep(2)
shutil.copyfile(newxml,oldxml)
ixbmc.executebultin("Notification(NEW SETTINGS, installed,()")
xbmc.executebuiltin("ReloadSkin()")

Basically its for my folks. I write the script, then they get it on their RPi when they update Super favourites. They then Click on the link to update the settings and thats it.

Not only that, I'm leaning Python, and am writing a series of programs to do useful things. I know they may have been written before and in different ways but I'm learning, and that's the point of the whole thing. time.sleep() is in there just to slow things down, so I can See what's its doing easily via explorer.And I should probably use os.path.exists() if else etc, but i know in my case it will do which is why I havnt used it.

Thanks Phil65,
Reply
#8
Which settings do you need to update? You can edit most settings of that file either via JSON or via Skin.SetBool/Skin.Reset/Skin.SetString. That way is much cleaner.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#9
The only ones that I want to change for the moment are

<setting type="string" name="skin.ccm.helix.AddonSetTwo.7.Label"></setting>
<setting type="string" name="skin.ccm.helix.AddonSetTwo.7.Icon"></setting>
<setting type="string" name="skin.ccm.helix.AddonSetTwo.7.Path"></setting>
Reply
#10
then why not just
Code:
xbmc.executebuiltin("Skin.SetString(AddonSetTwo.7.Label,YOUR_VALUE)")
?
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#11
(2015-06-15, 18:14)phil65 Wrote: then why not just
Code:
xbmc.executebuiltin("Skin.SetString(AddonSetTwo.7.Label,YOUR_VALUE)")
?

Ok thanks Im going to give it a go. Ill Report back.

Thanks phil65
Reply
#12
(2015-06-15, 21:00)myfototv Wrote:
(2015-06-15, 18:14)phil65 Wrote: then why not just
Code:
xbmc.executebuiltin("Skin.SetString(AddonSetTwo.7.Label,YOUR_VALUE)")
?

Ok thanks Im going to give it a go. Ill Report back.

Thanks phil65

Yep Thats done it.

Brilliant, Thanks Phil65
Reply

Logout Mark Read Team Forum Stats Members Help
Parameters for UnloadSkin() and ReloadSkin()0