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)



- Tolriq - 2010-04-16

+1 with file information Smile (and better if it can be returned when querying the database)


- Bram77 - 2010-04-20

All available namespaces and methods have been implemented. For some methods it's unclear what parameters are expected and not all methods function correctly (in the JSON RPC api). The code is available in the google code repo (sig), It will be minified and optimized over the next few days. I've added some extra functionality (more will be added). I've decided to be consequent and transformed Library.Music to Library.Audio

A sceenshot of the demo page (with all currently available methods) belowwww...

Image


- griffore - 2010-04-20

Looks good Bram77, will you be providing any releases?


- Bram77 - 2010-04-20

You can do a SVN checkout Smile I will make releases when the JSON RPC api is a bit more mature. I'm guessing some things will change and quite a few methods will be added since some data just isn't retrievable yet en some functionality can't be addressed.

Once there is a version that capable of doing everything required to build a complete interface I will minify/pack the library, create proper documentation and put it up for download.


- slash - 2010-04-20

Hi,

- If the execvideodatabse() execmusicdatabse() HTTP API functions will be depreciated, what would be the replacement for database modifications (DELETE and INSERT)

- Would it be possible to add '*' to get all fields (was asked before but got lost after the forum restore) ?

- XWMM tool is completely web based (javascripts). With little modifications it could we a nice web interface for XBMC. They only thing is that it uses EXT-JS framework which is GPL 3. Any thoughts on this ?

Thanks

NOTE : the next version of XWMM will be using JSON RPC and it is a lot faster thanks for the nice workWink


- spiff - 2010-04-20

slash; specific functions. like deletemovie, deleteepisode etc. it's madness to
1) expose the db to general mayhem
2) have external apps rely on a particular db layout.


- slash - 2010-04-20

Hi Spiff,

I totally agree with you.

XWMM rely on some HTTP API functions and I was wondering how to port it to the new API (like changing a field or genre for DB items)

There is some work done on an abstraction SQL commands. Would it be possible to either :
- run some SQL commands (DELETE, INSERT, etc ...) via the json-rpc
and have reply with OK or error ?

- start a python script (with parameters) via json-rpc ?

I realize that it requires to know the DB structure but, for the moment, I don't have other suggestions Huh


- Bram77 - 2010-04-20

slash Wrote:Hi,

- If the execvideodatabse() execmusicdatabse() HTTP API functions will be depreciated, what would be the replacement for database modifications (DELETE and INSERT)

- Would it be possible to add '*' to get all fields (was asked before but got lost after the forum restore) ?

- XWMM tool is completely web based (javascripts). With little modifications it could we a nice web interface for XBMC. They only thing is that it uses EXT-JS framework which is GPL 3. Any thoughts on this ?

Thanks

NOTE : the next version of XWMM will be using JSON RPC and it is a lot faster thanks for the nice workWink

Why not use the JS library?


- jmarshall - 2010-04-21

Arbitrary SQL is NOT going to be done if I have anything to do with it.

We will instead provide methods as spiff says to allow editing of specific information where it makes sense to do so.


- slash - 2010-04-21

jmarshall Wrote:Arbitrary SQL is NOT going to be done if I have anything to do with it.

We will instead provide methods as spiff says to allow editing of specific information where it makes sense to do so.

Oh, sorry I replied too quickly and misunderstood spiff reply.

Thanks for the clarification.


- Kabooga - 2010-04-21

Would this be the correct area to ask (beg, plead) for those methods mentioned by jmarshall?


- Tolriq - 2010-04-21

Well topfs has a lot of work Smile

The most important is to not drop http api in next release if jsonrpc does not provide enough function to not break a big part of XBMC ecosystem.


- Kabooga - 2010-04-21

I agree with that.


- topfs2 - 2010-04-21

Tolriq Wrote:Well topfs has a lot of work Smile

The most important is to not drop http api in next release if jsonrpc does not provide enough function to not break a big part of XBMC ecosystem.

Oh don't be scared, we won't drop httpapi in any case in next release Smile
The first possible drop would be camelot+2 but even then its iffy.

For requests, just list them here, I'll take care off them when I get time from school. Usually I go mad a day or so and implement most Smile Also the more details like arguments and such and details on how they should behave, the easier it is for me.

Cheers,
Tobias


- Tolriq - 2010-04-22

Well still waiting the seekPercent you promise :p:p:p

But if you don't drop httpapi is it possible to repair :
WebServerStatus() ? currently it don't send "On", usefull to check for xbmc presence.

And if you can use the same \n in the html headers than in camelot Smile
between builds the returns are before, after, are not Smile not easy to follow

Edit : And for work i was talking about real life work , afterall there's more important things than XBMC Smile