2021-01-02, 02:14
I found this script on the forum to change skins and it works like a champ. What I would like to add at line 8 is a way to copy a modified settings.xml and replace the existing file before switching back to the skin at the end of the script. I have a handful of modified settings.xml files in subdirectories of the skin folder in addon_data. I couldn't find an example of this anywhere. Is this possible?
XML:
import xbmc, xbmcgui
xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"Settings.SetSettingValue","id":1,"params":{"setting":"lookandfeel.skin","value":"skin.estuary"}}')
xbmc.sleep(1000)
xbmc.executebuiltin('SendClick(11)')
dialog = xbmcgui.Dialog()
dialog.ok("Skin Changer", "CLICK OK TO CHANGE SKIN SETTINGS")
xbmc.sleep(1000)
COPY COMMAND HERE...
xbmc.sleep(1000)
xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"Settings.SetSettingValue","id":1,"params":{"setting":"lookandfeel.skin","value":"skin.aeonmq8.matrix.mod"}}')
xbmc.sleep(1000)
xbmc.executebuiltin('SendClick(11)')
dialog = xbmcgui.Dialog()
dialog.ok("Skin Changer", "NEW SKIN SETTINGS LOADED!")