xhunter wrote:Thank you very much, I got it working,
Good.
even through I didn't understand how "[["fullscreen"]]" was able to get the fullscreenvideo status, but it's working perfectly as it should.
but all I was getting was "invalid type string received"
Kodi JSON-RPC parameters can be "ByName" (uses {}) or "ByPosition" (uses []),
GUI.Getproperties takes one parameter so my example is "ByPosition"
So it don't need the "properties" parameter name.
So your code was missing a colon (:) that is needed to separate the parameter name and value:
Code: Select all
eg.plugins.XBMC.JSONRPC(u'GUI.Getproperties', u'"properties":["currentwindow"]', False)
Or you can skip the "properties" part and surround it with []:
Code: Select all
eg.plugins.XBMC.JSONRPC(u'GUI.Getproperties', u'[["currentwindow"]]', False)
With other commands that have more parameters and you use "ByName" the order of the parameters doesn't matter and you can skip optional parameters, if you use "ByPosition" they need to be in exactly the right order and you can't skip parameters from the middle only from the end.
Edit:
Sometimes you can skip the "{}" or "[]" like if the parameter is only one string or number or something non ambiguous.
For example you can't remove the [] from this [["fullscreen"]] as the plugin wouldn't know its supposed to be a list of strings.
jonib