XBMC Community Forum
JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Development (/forumdisplay.php?fid=93)
+---- Forum: JSON-RPC (/forumdisplay.php?fid=174)
+---- Thread: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC (/showthread.php?tid=68263)



- Montellese - 2012-01-10 11:33

Thanks for the report giftie. I fixed it in https://github.com/xbmc/xbmc/commit/6aa04be25d47b654d45c906ced9d5affe74e43e8. You were right if the file was not in the database and XBMC wasn't able to retrieve any meta-data from it, it simply didn't show up in the response.


- samdret - 2012-01-10 19:22

Sorry if this has been asked a lot, but I can't seem to find any information regarding it.

After I've called JSONRPC.Introspect and gotten a list of available commands, where can I get information on which parameters each command accepts? I.e. I would like more than just label and id when I call VideoLibrary.GetRecentlyAddedMovies


- Montellese - 2012-01-10 19:29

samdret Wrote:Sorry if this has been asked a lot, but I can't seem to find any information regarding it.

After I've called JSONRPC.Introspect and gotten a list of available commands, where can I get information on which parameters each command accepts? I.e. I would like more than just label and id when I call VideoLibrary.GetRecentlyAddedMovies

Unless you are using Dharma, JSONRPC.Introspect provides you will all the information about every parameter of every method. You can also find some (limited) information on the wiki.

In case you are using Dharma I recommend to either wait till Eden stable has been released or if you can't wait update to Eden Beta 1 and to take a look at the new introspect.

Concerning your question on VideoLibrary.GetRecentlyAddedMovies: You must specify the additional information you want in the "properties" parameter as an array of strings (e.g. [ "title", "rating", "thumbnail" ]).


- Mizaki - 2012-01-10 20:00

Should Player.SetSubtitle and Player.SetAudioStream trigger GUI notifications? Currently they don't seem to.


- Montellese - 2012-01-10 20:22

What do you mean by GUI notification? A notification dialog telling you that you switched to audiostream XYZ? Don't you know that already because you initiated the action? AFAIK there's no such thing in XBMC.


- samdret - 2012-01-10 21:57

Montellese Wrote:Unless you are using Dharma, JSONRPC.Introspect provides you will all the information about every parameter of every method. You can also find some (limited) information on the wiki.

In case you are using Dharma I recommend to either wait till Eden stable has been released or if you can't wait update to Eden Beta 1 and to take a look at the new introspect.

Concerning your question on VideoLibrary.GetRecentlyAddedMovies: You must specify the additional information you want in the "properties" parameter as an array of strings (e.g. [ "title", "rating", "thumbnail" ]).

How stupid of me. The wrapper I'm using was dumbing down the content created from Introspect.

Got it up to snuff now Smile


- Mizaki - 2012-01-10 22:18

Montellese Wrote:What do you mean by GUI notification? A notification dialog telling you that you switched to audiostream XYZ? Don't you know that already because you initiated the action? AFAIK there's no such thing in XBMC.

If I say toggle subtitles on or off with the "t" key a notification appears on screen basically saying subtitles on/off. I have mapped a key to switch audio streams. If I hit that I get a notification on screen telling me what audio stream I've switched to.

The question is really; should JSONRPC calls for these things act the same as a button press of the same function?


- Montellese - 2012-01-11 01:07

Ah I only switch subtitles/audiostreams through the OSD dialog in the XBMC GUI so I never came across those notifications.

Good question concerning whether they should appear or not. I don't really have an opinion on it because I never used it so far. I'll have to think about it and aks other people what they'd expect.


- Mizaki - 2012-01-11 10:48

I think it would make life much easier for the user. Say you have 8 different subtitles. Atm you'd be blindly cycling through and having to wait for someone to talk to see which langague you are currently on. Whereas if you had the popup you'd know.


- Montellese - 2012-01-11 12:44

I just pushed a commit which refactores the way the methods of the Input namespace work. Up until now Input.Left/Right/... could only be used for navigational purposes but didn't work in other places like in fullscreen video where the "Arrow Right" key on the keyboard performs a small seek forward. After this change executing the Input.Left method has the exact same effect as when pressing the "Arrow Left" key on the keyboard. Obviously this also applies to Input.Right/Up/Down/Back/Select.

I hope this makes using these methods easier and more intuitive. Furthermore addons now get a fully qualified action object in python with valid name and buttoncode (and not only with a valid action id).