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

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



RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-10-11

I don't follow. Where do you have { "type": "shuffle/repeat" } from?


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Mizaki - 2012-10-11

Sorry. That was my logging. I'm not getting any notification on shuffle or repeat which is why I confused the message.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-10-14

(2012-10-10, 02:27)yallah Wrote: Hi,

Sorry but since commit 8b9f91d3f765f370fd479ac64229a9be805f2dd1 (https://github.com/xbmc/xbmc/pull/1480), I have some problems to get thumbnail or fanart with JSON (can't get any images for musics and videos...). I use exactly same command methods, with same computer(on windows 7), same db, same mysql, same library,....

just before commit 8b9f91d3f765f370fd479ac64229a9be805f2dd1: http://xbmclogs.com/show.php?id=10314
with commit 8b9f91d3f765f370fd479ac64229a9be805f2dd1 : http://xbmclogs.com/show.php?id=10315

thx

Fixed with https://github.com/xbmc/xbmc/commit/c9196f38488ccaa6477e6d7ab3212d9793dae7e3


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-10-16

Tuesday, October 16th 2012:
Commits: 504e9c41f6720ed6edfc
  • added support to control PVR streams to Player namespace
  • added "channelid" property to Player.Open's "item" parameter
  • added channel-specific properties to Player.GetItem (valid properties for a PVR stream/channel returned by Player.GetItem are "channeltype", "hidden", "locked", "channel", "lastplayed", "channelnumber", "rating", "title", "plotoutline", "plot", "genre", "starttime", "endtime", "runtime", "firstaired")
  • added Player.OnPlay and Player.OnStop notifications when switching a PVR channel
  • added new PVR namespace with the following methods
    • GetProperties with properties "available", "recording", "scanning"
    • GetChannelGroups
    • GetChannelGroupDetails
    • GetChannels
    • GetChannelDetails
    • Record
    • Scan

Remember this is just very basic support to be able to control PVR channels i.e. list groups/channels, start a channel and control its playback. Anything else is most likely out of scope for Frodo because we are already in feature freeze so please hold your horses on any (wild) feature requests. I'll open an extra thread for feature suggestions on PVR for Frodo+1.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Tolriq - 2012-10-16

Great Smile Is there thumb support also for channels ? in getItem ?


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-10-16

Ah yeah "thumbnail" should give you the icon or whatever is available. Forgot to mention it in the list.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Mizaki - 2012-10-16

Yeah, you get the channel logo if it shows in the GUI of course Smile

Thanks for getting this in.

Has anyone tried accessing the EPG via videodb:// or similar?


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-10-16

I haven't found a VFS URL that maps to EPG entries so most likely not possible right now.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Mizaki - 2012-10-16

It was a long shot Smile I think it's fair enough to expect the backend to have the EPG available anyway.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - yallah - 2012-10-16

ehehh THX for PVR Json Smile


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Ayla - 2012-10-19

What is the correct way to navigate the PVR OSD with JSON-RPC commands?

For example, I send this command to bring up the OSD Channels window (which works correctly):
{"jsonrpc":"2.0","id": 1,"method":"GUI.ActivateWindow", "params": {"window":"pvrosdchannels"}, "id": "1"}}

Then, I try to navigate the list with:
{"jsonrpc":"2.0","method":"Input.Up","id":1}

Or with:
{"jsonrpc":"2.0","id": 1,"method":"Input.ExecuteAction", "params": {"action": "up"}, "id": "1"}

Neither works…

I'm using the latest Frodo nightly from today.



RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Jasp - 2012-10-19

(2012-10-19, 18:30)Ayla Wrote: What is the correct way to navigate the PVR OSD with JSON-RPC commands?

For example, I send this command to bring up the OSD Channels window (which works correctly):
{"jsonrpc":"2.0","id": 1,"method":"GUI.ActivateWindow", "params": {"window":"pvrosdchannels"}, "id": "1"}}

Then, I try to navigate the list with:
{"jsonrpc":"2.0","method":"Input.Up","id":1}

Or with:
{"jsonrpc":"2.0","id": 1,"method":"Input.ExecuteAction", "params": {"action": "up"}, "id": "1"}

Neither works…

I'm using the latest Frodo nightly from today.

After seeing that GUI.ActivateWindow was added I've updated to the latest as well.

I can't seem to navigate to Movies from TV Shows and vice versa. whenever I send the following command I get sent to the one I was previously at:

Code:
{"jsonrpc":"2.0","id": 1,"method":"GUI.ActivateWindow", "params": {"window":"video"}, "id": "1"}}

Is there a way to go directly to Movies or TV Shows?



RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-10-20

(2012-10-19, 18:30)Ayla Wrote: What is the correct way to navigate the PVR OSD with JSON-RPC commands?

For example, I send this command to bring up the OSD Channels window (which works correctly):
{"jsonrpc":"2.0","id": 1,"method":"GUI.ActivateWindow", "params": {"window":"pvrosdchannels"}, "id": "1"}}

Then, I try to navigate the list with:
{"jsonrpc":"2.0","method":"Input.Up","id":1}

Or with:
{"jsonrpc":"2.0","id": 1,"method":"Input.ExecuteAction", "params": {"action": "up"}, "id": "1"}

Neither works…

I'm using the latest Frodo nightly from today.
Will have to give this a try.

(2012-10-19, 22:52)Jasp Wrote: After seeing that GUI.ActivateWindow was added I've updated to the latest as well.

I can't seem to navigate to Movies from TV Shows and vice versa. whenever I send the following command I get sent to the one I was previously at:

Code:
{"jsonrpc":"2.0","id": 1,"method":"GUI.ActivateWindow", "params": {"window":"video"}, "id": "1"}}

Is there a way to go directly to Movies or TV Shows?

You can pass a specific node in the "parameters" parameter which will be passed on to the activated window and open that node. If you e.g. want to go directly to the list of movie titles you need to do
Code:
{ "jsonrpc": "2.0", "method": "GUI.ActivateWindow", "params": { "window": "video", "parameters": [ "MovieTitles" ] }, "id": 1 }
For the list of TVShow titles you replace "MovieTitles" with "TvShowTitles".


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2012-10-21

(2012-10-19, 18:30)Ayla Wrote: What is the correct way to navigate the PVR OSD with JSON-RPC commands?

For example, I send this command to bring up the OSD Channels window (which works correctly):
{"jsonrpc":"2.0","id": 1,"method":"GUI.ActivateWindow", "params": {"window":"pvrosdchannels"}, "id": "1"}}

Then, I try to navigate the list with:
{"jsonrpc":"2.0","method":"Input.Up","id":1}

Or with:
{"jsonrpc":"2.0","id": 1,"method":"Input.ExecuteAction", "params": {"action": "up"}, "id": "1"}

Neither works…

I'm using the latest Frodo nightly from today.

I just tested this and it works for me. But there are two things that might cause this problem:
  • Calling GUI.ActivateWindow with a "window" parameter that is actually a dialog will block that request/thread until the dialog has been closed.
  • There can be a dead lock when switching channels etc so maybe your XBMC was already dead locked when you tried those commands.



RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Ayla - 2012-10-21

(2012-10-21, 10:57)Montellese Wrote:
(2012-10-19, 18:30)Ayla Wrote: What is the correct way to navigate the PVR OSD with JSON-RPC commands?

For example, I send this command to bring up the OSD Channels window (which works correctly):
{"jsonrpc":"2.0","id": 1,"method":"GUI.ActivateWindow", "params": {"window":"pvrosdchannels"}, "id": "1"}}

Then, I try to navigate the list with:
{"jsonrpc":"2.0","method":"Input.Up","id":1}

Or with:
{"jsonrpc":"2.0","id": 1,"method":"Input.ExecuteAction", "params": {"action": "up"}, "id": "1"}

Neither works…

I'm using the latest Frodo nightly from today.

I just tested this and it works for me. But there are two things that might cause this problem:
  • Calling GUI.ActivateWindow with a "window" parameter that is actually a dialog will block that request/thread until the dialog has been closed.
  • There can be a dead lock when switching channels etc so maybe your XBMC was already dead locked when you tried those commands.

Thanks for the help!

The first point sounds like that could be the problem, how can I avoid that, can I call the "pvrosdchannels" dialog/window with another command?

I'm still trying to figure out this JSON-RPC stuff, I don't quite understand the command-structure/what each element in a command means Smile