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 - claymic - 2013-10-06

Hi Montellese, very thanks for your help.
I found a way to manage this with a script, XBMC.GetInfoLabels and a javascript code my interface.
Thanks for your help
Clayton


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

May I ask some question?
How can I get all songs that was performed by various artists?
This request:
Code:
{"jsonrpc":"2.0","id":"getsongofalbum","method":"AudioLibrary.GetSongs","params":{"properties":["title","artist","genre","track","duration","year","rating","playcount"],"filter":{"artistid":1}}}
just works with only one artist. How to retrieve songs that has its artists are "David", "Justin" - for example?


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

(2013-10-08, 04:53)Songokute Wrote: May I ask some question?
How can I get all songs that was performed by various artists?
This request:
Code:
{"jsonrpc":"2.0","id":"getsongofalbum","method":"AudioLibrary.GetSongs","params":{"properties":["title","artist","genre","track","duration","year","rating","playcount"],"filter":{"artistid":1}}}
just works with only one artist. How to retrieve songs that has its artists are "David", "Justin" - for example?

For a single condition:
Code:
{"jsonrpc":"2.0","id":"getsongofalbum","method":"AudioLibrary.GetSongs","params":{"properties":["title","artist","genre","track","duration","year","rating","playcount"], "filter": {"operator": "contains", "field": "artist", "value": "david"}}}

and for either/or:
Code:
{"jsonrpc":"2.0","id":"getsongofalbum","method":"AudioLibrary.GetSongs","params":{"properties":["title","artist","genre","track","duration","year","rating","playcount"],
"filter": {"or": [{"operator": "contains", "field": "artist", "value": "david"}, {"operator": "contains", "field": "artist", "value": "justin"}]}}}

See API for different operator values.


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

There is no "VideoLibrary.SetSeason" method, so it's impossible to set or change Season artwork using JSON, unless I've overlooked some other solution?


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

Correct.


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

Bummer. Sad

Any chance of you making a note of it on your (no doubt very long) "to do" list? Wink


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - KenshiHH - 2013-10-12

hi,
anyone knows why the VideoLibrary.Scan checks only the Subfolders for Movie Librarys and not for TV Shows?

{"jsonrpc": "2.0", "method": "VideoLibrary.Scan", "params": {"directory":"/home/movies/DVD"},"id": 1}


RE: - claymic - 2013-10-12

Hi guys
Is there a way to use JSON to play a video file (will be a trailer) in a small window ? I look in the Player.Open options, but i dont found any option to do this.
Thanks
Clayton


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

(2013-10-12, 17:45)claymic Wrote: Hi guys
Is there a way to use JSON to play a video file (will be a trailer) in a small window ? I look in the Player.Open options, but i dont found any option to do this.
Thanks
Clayton

Nope, that's not possible. AFAIK this is something skin specific (the smaller trailer windows).


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

I have XBMC configured to use the client channels numbers but sing PVR.GetChannels in Gotham, the call return returns the XBMC channe numbers If it is configured for client numbers I think the JSON should return iClientChannelNumber

Martin


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

(2013-10-05, 09:09)Montellese Wrote: Supporting null (and empty strings) in the interface is certainly possible. The question is how to pass the null value on to CVideoDatabase since it expects a map<string,string>.

@Montellese, do you think it will be possible to add this before the next API version bump? Happy to help test as soon as anything is available (PR etc.).


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

(2013-10-29, 10:58)MilhouseVH Wrote:
(2013-10-05, 09:09)Montellese Wrote: Supporting null (and empty strings) in the interface is certainly possible. The question is how to pass the null value on to CVideoDatabase since it expects a map<string,string>.

@Montellese, do you think it will be possible to add this before the next API version bump? Happy to help test as soon as anything is available (PR etc.).

See PR3519 and let me know if it works.


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

Initial testing of PR:3519 is looking good - many thanks.


RE: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - tiago - 2013-10-29

Hi everyone,

I'm a Ph.D. student in the Netherlands researching the evolution and maintenance of web APIs. The XBMC project got my attention when I noticed that there's actually a JSONRPC API and a few Android (and I presume iOS) clients which connect to it.

What I was wondering is whether the developers who are the most familiar with the JSON-RPC API would be willing to do a 30~45 minute Skype interview with me on the design choices of the XBMC web API. Is this something the devs would be willing to participate on?

Also, similarly, if there's any client developers in this thread, the invitation is also extended to them as we would like to get insight from both the developers of the server-side code as well as those on the client-side.

Thanks in advance for your cooperation!

Best,
Tiago


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

(Testing with latest Gotham master, API v6.12.0)

I'm trying to retrieve details of all movie files that are members of a movie set:

Code:
{"jsonrpc": "2.0", "params": {"filter": {"field": "set", ""operator": "isnot", value": ""}, "properties": ["file", "set"]}, "method": "VideoLibrary.GetMovies", "id": "libMoviesSets"}

however the above is returning ALL movies, those with set == "" and those with set != "", which suggests the "isnot" filter isn't working for the "set" property.

The only working filters are "contains" and "doesnotcontain", so I've had to use the following to achieve the above functionality:
Code:
{"jsonrpc": "2.0", "params": "filter": {"field": "set", "operator": "doesnotcontain", "value": "@@
@@@@@@@@@@"}, "properties": ["file", "set"]}, "method": "VideoLibrary.GetMovies", "id": "libMovies-sets"}

ie. specify a (hopefully) bogus value, which isn't very nice but at least it returns only those movies that are members of a set.