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)



- _Andy_ - 2010-05-24

Thx. One more question. I add some TV Shows to the library. In XBMC every show have a Show Summary on the first page. The infos are stored in a xml file. The name of the xml file is stored in the Myvideos34.db/tvshow/c12
How can i query this info?
I want to show a summary on my ipad too.


- topfs2 - 2010-05-24

Check the POC webinterface, it shows summaries for movies. Its param "fields": ["description"] IIRC


- _Andy_ - 2010-05-24

{"jsonrpc": "2.0", "method": "VideoLibrary.GetTVShows","params": {"fields": ["plot"]}, "id": 1}

that did the trick.


Start playing a song - remco9999 - 2010-05-28

Dear jsonrpc users,

I'm trying to get some library together along with a simplistic remote control for the new windows mobile 7. Howver starting an album is easy, thats in the html page albums.html. But playing a specific song i'm just shooting in the dark, so my first shot is:
"{\"jsonrpc\":\"2.0\", \"method\": \"XBMC.Play\", \"params\": { \"songid\": 10 }, \"id\": 1}"

Well no song is starting so its either broken (guess not) or i am using the wrong command (most probable cause).

Can anybody tell me the param for starting up a song?

And i'm trying to find out which fields i can get while retreiving the album songs, wnated the track number so i tried track, duhh wrong name.

Can anybody tell me the name of the track index for a song?

Even better anybody that can point me to some fishing gear? or maybe where or how i can get fields defs for the objects and params for the actions. I already looked at the development.html, bit to heghlevel for my purpose. Can I get more info calling the introspect functions?

Well who can take away the pain, in return I can give you a .NET c# library usable in Silverlight projects.

Regards!


- topfs2 - 2010-05-28

Songs doesn't have ID's, you can start the files though.

It is abit buggy though since the metadata doesn't get loaded


Playing a song - remco9999 - 2010-05-29

So it should be

"{\"jsonrpc\":\"2.0\", \"method\": \"XBMC.Play\", \"params\": { \"file\": \"[filename]\" }, \"id\": 1}"

Gonna try this later tonight.

But no pointers to how i can get some more detailed info on functions and fields.

Regards

[edit] don't know why but i just failed to read a few posts back :-) my answer is already there


- Kabooga - 2010-05-29

Quote:It is abit buggy though since the metadata doesn't get loaded

Oh good. I thought I was doing something wrong. I had added a directory to the playlist and then the playlist returned empty strings in the title field.

Keep up the good work topfs2!!

Kabooga


Still trying to play a song - remco9999 - 2010-05-29

Going nowhere with the xbmc.play and file:, like

"{\"jsonrpc\":\"2.0\", \"method\": \"XBMC.Play\", \"params\": { \"file\": \"D:\\Data\\Music\\Underworld\\A Hundred Days Off\\A Hundred Days Off - 04 - Sola Sistim.mp3\" }, \"id\": 1}"

So I tried getting the info from the xbmcweb project from Bram. Very nice code but I can't easily spot what is happening when playing a song.

My guess is now on: a) add a song to the audioplaylist, b) start that item on the playlist.

Or maybe i just have somthing wrong in the json string on top. Any pointers are welcome!


- Bram77 - 2010-05-31

Thanks for the code-compliment Smile
You could do a checkout and place the code in the web directory (in the root) and use firebug to see exactly what json stings are put together and posted.
I have very little free time atm, so the code hasn't been touched for a week or two and not all functionality has been implemented into the interface. But the basics are there.


- remco9999 - 2010-05-31

Thanks Bram, that would probably give me the SDK i need :-)


- jbrennan - 2010-05-31

Having a little trouble getting the development webpage to load. I've got a copy of XBMC running which I built from svn, on Mac OS 10.6, and the JSON RPC is working, however when I try to visit http://localhost:8888/development.html I get "File not found" (just text, it's not my browser's error message) (port 8888 is where I'm running xbmc on this machine). If I try get http://localhost:8888/jsonrpc I get the message that it's up and running.

I'm having other issues but I figure I should get this one solved first, as it might solve my other problems.


- Kabooga - 2010-06-01

jbrennan,

You might want to try http://localhost:8888/poc_jsonrpc/development.html

This might get it to work.


- jbrennan - 2010-06-01

Thanks Kabooga.

That works, although none of my media appears (while it does in the remote app I'm working on). Not sure if this is natural or not?


- Briam - 2010-06-04

Hi

I'm trying to code a java jsonrpc library. Currently got to VideoLibrary methods and can't figure out if it's correct that "VideoLibrary.GetMusicVideoAlbums" got no parameters?

http://github.com/brianfrolund/xbmcjavaweb


- Kabooga - 2010-06-06

Looking at the code it looks like the "VideoLibrary.GetMusicVideoAlbums" handler is merely a stub that doesn't do anything.

It may be topfs2 has not gotten to it yet. The JSON-RPC interface is still in development.

Hope this helps answer your question.