2016-04-16, 10:02
Marcel do you remember the FR about toggle kodi options?
I'm needing this since I'm always switch the gui language (my skin is support both rtl\ltrf alignment)..
kind of tired to do that from kodi settings... for now I made a workaround with my poor python skills
but I always stick to your latest git and need to rewrite it..
I'm needing this since I'm always switch the gui language (my skin is support both rtl\ltrf alignment)..
kind of tired to do that from kodi settings... for now I made a workaround with my poor python skills
Code:
def toggleKodiSetting(settingname):
#toggle kodi setting
#curValue = xbmc.getCondVisibility("system.getbool(%s)"%settingname)
if random.randint(1,2) == 2:
newValue = "resource.language.en_gb"
else:
newValue = "resource.language.he_il"
xbmc.executeJSONRPC('{"jsonrpc":"2.0", "id":1, "method":"Settings.SetSettingValue","params":{"setting":"%s","value":"%s"}}' %(settingname,newValue))
Code:
<F3>RunScript(script.skin.helper.service,action=togglekodisetting,setting=locale.language)</F3>
but I always stick to your latest git and need to rewrite it..