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 - Samtronic - 2013-07-20

HI !

Is it possible to retrieve by a json command a message send by the json command 'GUI.ShowNotification'.

Thanks

Steven


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Milhouse - 2013-07-31

Just mentioning it here in case it goes unnoticed, but in Frodo (OpenELEC 3.1.5) calling VideoLibrary.GetEpisodes and requesting the runtime property always returns a value of zero, unless streamdetails is also specified.

I've opened a ticket, #14524.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - mikebzh44 - 2013-08-06

Small question about Music Videos.

How to play musicvideo from JSONRPC ?

This code did not play the music video but the movie with the same id :

Code:
xbmc.executeJSONRPC('{ "jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "musicvideoid": %d } }, "id": 1 }' % int(params.get("musicvideoid")))

musicvideoid = 1

Image

Image


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2013-08-07

Sounds like a bug, I'll look into it.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2013-08-07

(2013-08-06, 10:57)mikebzh44 Wrote: Small question about Music Videos.

How to play musicvideo from JSONRPC ?

This code did not play the music video but the movie with the same id :

Code:
xbmc.executeJSONRPC('{ "jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "musicvideoid": %d } }, "id": 1 }' % int(params.get("musicvideoid")))

musicvideoid = 1

Image

Image

I tried it myself and it works as expected. I used "musicvideoid": 10 and it played the musicvideo with the ID 10. There is also a movie with the ID 10 but that didn't change anything.
What version of JSON-RPC and/or XBMC are you using?


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - mikebzh44 - 2013-08-07

XBMC (12.2 Git:20130502-32b1a5e)

How to know JSON version ?


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Martijn - 2013-08-07

(2013-08-07, 09:38)mikebzh44 Wrote: XBMC (12.2 Git:20130502-32b1a5e)

How to know JSON version ?
http://wiki.xbmc.org/index.php?title=JSON-RPC_API/v6#JSONRPC.Version

but it's also clear from the XBMC version


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2013-08-07

OK I tried with the latest development version. Will try with Frodo 12.2 later on.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - mikebzh44 - 2013-08-07

I will give a try with Gotham Alpha 6


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - mikebzh44 - 2013-08-07

It's OK with Gotham Alpha 7 but also with Frodo 12.2

It's a skin issue. I'm running Aeon Nox 4.1.9 and if I create a custom menu with custom command :

RunScript(script.randomandlastitems,musicvideoid=1)

Then the right music video file is played.

But the same command send by a widget play the movie with the same ID.

So everything is OK with JSON-RPC. Sorry Sad


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - dsiggi - 2013-08-11

Hi guy.
I would like to start the PartyMode(music) over json. But I dont' know why.
Can you help me?

Tanks.


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

(2013-08-11, 13:40)dsiggi Wrote: Hi guy.
I would like to start the PartyMode(music) over json. But I dont' know why.
Can you help me?

Tanks.

There are two ways to do this. Either if a player is already active you can use Player.SetPartyMode or you can use Player.Open and pass in the "partymode" property as part of the "item" parameter i.e.
Code:
{ "jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "partymode": "music" } }, "id": 1 }
or replace "music" with "video" for music videos.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - thica - 2013-08-26

Hello,

can't find it in the API reference. Is here a way to direct switch to a TV channel (PVR) using a json command?


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Montellese - 2013-08-27

(2013-08-26, 21:59)thica Wrote: Hello,

can't find it in the API reference. Is here a way to direct switch to a TV channel (PVR) using a json command?

Player.Open can take a "channelid" property in the "item" parameter.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Milhouse - 2013-08-31

Would it be possible to add support for the "file" param on SetFoo, so you could change the path for a file via JSON (you can change the paths of all other attributes, eg. artwork, but not the media file itself).