Solved ActivateWindow to "subdirectories?"
#1
Hello All,

Okay, I've been experimenting with window access/navigation via JSON RPC calls and am having a bit of difficulty with an item mentioned in the wiki.

For the record, v6 (Frodo).

Access to the "parent directory" for videos is working when I use...

jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"videos"},"id":"1"}}

...however, I can't seem to directly navigate to my Movies or TV Shows pages.

At http://wiki.xbmc.org/index.php?title=Ope...nd_Dialogs , The wiki states I should use something like...

ActivateWindow(Videos,MovieTitles)

...but attempting this in my call has failed. I've tried the following variants:

jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"videos,movietitles"},"id":"1"}}

jsonrpc?request={"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"videos","movietitles"},"id":"1"}}

Both fail, stating that "movietitles" is not a recognized enumerator.

So, how to I get this to work? How do I directly navigate to either the Movies or the TV Shows via a JSON RPC call?
Reply
#2
The "window" is still "videos" but you can provide additional parameters using the "parameters" parameter so something like this should work:
Code:
{"jsonrpc":"2.0","method":"GUI.ActivateWindow","params":{"window":"videos", "parameters": "movietitles"},"id":"1"}}
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
Thanks, Montellese.

...getting closer, hopefully.

current response to your suggestion:

{"error":{"code":-32602,"data":{"method":"GUI.ActivateWindow","stack":{"message":"Invalid type string received","name":"parameters","type":"array"}},"message":"Invalid params."},"id":"1","jsonrpc":"2.0"}

I just need to figure out the proper way to pass in the string as an element in an array of values and I'll be good.
Reply
#4
(2014-02-17, 00:13)dingerjunkie Wrote: Thanks, Montellese.

...getting closer, hopefully.

current response to your suggestion:

{"error":{"code":-32602,"data":{"method":"GUI.ActivateWindow","stack":{"message":"Invalid type string received","name":"parameters","type":"array"}},"message":"Invalid params."},"id":"1","jsonrpc":"2.0"}

I just need to figure out the proper way to pass in the string as an element in an array of values and I'll be good.

Ah sorry I didn't see that you are using Frodo. In the nightly builds and the next stable release the request I posted will work. In Frodo you need to use
Code:
{ "jsonrpc": "2.0", "method": "GUI.ActivateWindow", "params": { "window":"videos", "parameters": [ "movietitles" ] }, "id": "1"} }

PS: It won't hurt if you read a bit about JSON, JSON schema and JSON-RPC. Then you'd know how to put together an array of values.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#5
Greatly appreciated, Montellese. I am in the beginning stages of my self-teaching, so this early guidance is a huge help.
Reply

Logout Mark Read Team Forum Stats Members Help
ActivateWindow to "subdirectories?"0