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)



- peprasetya - 2010-05-17

Swwethip1 Wrote:i know this is still in the early stages, i tried build 30130 and i have a quick question regarding the web server accessing from a wince browser !!

WHen i access my session from the wince browser I can see the "XBMC Webinterface" home screen and click on all sections - now playing, movies, etc
but when there is something playing and i go to the "now playing" screen i can not see anything (ie: tracklist,player control,etc.)

my question is, what format is that being displayed in, java,flash?

Im currently using this custom REMOTE browser based off wince

also is there any guides yet for dev. skins.. i will be looking for 640x480 and 480x640 touch screen skins
thanks

I'm not sure with the remote browser that you in win ce. But i'm guessing that its quite aging browser. While the new web require quite modern browser. Especially the browser have to support xmlHttpRequest and dynamic html.

It may also heppened like in desktop that Internet Explorer have different way to access the xmlHttpRequest object than the rest of modern browser. And making web to be compatible with old ie also takes a lot time. Even Google have to stop they support for that old browser.


- Swwethip1 - 2010-05-19

thanks guys.. let me see what specs the wince browser can accepts.

are there any guides to making a web interface, that i can take a look at??


- peprasetya - 2010-05-19

Swwethip1 Wrote:thanks guys.. let me see what specs the wince browser can accepts.

are there any guides to making a web interface, that i can take a look at??

I'm not sure about documentation of this new jsonRPC.

But I think, you can refer to POC web that included in the SVN build of XBMC, or xbmcweb. But once again that they relies on XmlHttpRequest that I'm doubt supported in Win CE browser.

You can also try to look the old poc web on current stable release XBMC 0911, as it's still use more traditional way of http to update content, so the Win Ce Browser should able to follow.


- Bram77 - 2010-05-19

The most accurate documentation for the api is returned by the introspect method (development page in the demo web interface). But it doesn't always tells everything about the parameters expected.
You could have a look at the code of the JS library I'm writing. It's not finished but it does work pretty wel for most functionality.

http://code.google.com/p/xbmcweb/source/browse/#svn/trunk/trunk/library/xbmc/lib

The minified and packed versions are not up to date. So use the files in the lib directory in the link above.

The order in which the JS files should be included you can get from...
http://code.google.com/p/xbmcweb/source/browse/trunk/trunk/player.html

The follwong file shows what configuration parameters are expected and initialises the library (not everything in the file is library related)....
http://code.google.com/p/xbmcweb/source/browse/trunk/trunk/config/player/config.js

Examples of the ways you could use the api are mostly in this directory...
http://code.google.com/p/xbmcweb/source/browse/trunk/trunk/#trunk/view/player

...and in the js application framework...
http://code.google.com/p/xbmcweb/source/browse/trunk/trunk/#trunk/library/application/player


Again...everything is far from finished. So I wouldn't advise to use the library just yet. Starting from next week I'll have a lot more free time. Hopefully I'll have a more or less feature complete and bug free minified version available for download within a few weeks. If you have any questions or questions, please let me know.


- Swwethip1 - 2010-05-19

thanks guys for the info..

ok so i just word on what browser is on these remotes - Internet Explorer 6 for Windows CE and it also supports Flash7

so with that said, it looks like Java is out !! that stinks.. can we port over the old http stuff to this new jsonRPC ?

any other options?


- topfs2 - 2010-05-19

jsonrpc is accesible from whatever you choose. If you need flash, make a flash interface. You can get the data from flash if you need it.


- _Andy_ - 2010-05-19

Sorry to bother you with some basics. I´m very new to this stuff.

I want to develop a UI with the ipad. I downloaded the Windows version (XBMC 9.11r26017 (compiled: dec 23 2009)
How can i enable JSON-RPC? In settings/network i enabled control via http.
And I tried http://localhost:8080/development.html to get infos but i only get a error page. Do i need a later SVN version of XBMC?

what i´m missing?


- Bram77 - 2010-05-19

The version you've downloaded is way to old. Try downloading the latest nightly build from here -> http://www.sshcs.com/xbmc/


- Swwethip1 - 2010-05-19

is any dev. up to making a simple flash GUI @ 480x640 ?


- topfs2 - 2010-05-19

Swwethip1 Wrote:is any dev. up to making a simple flash GUI @ 480x640 ?

Just to be clear, this is a development page for JSONRPC. If you want to start hunting developers with whom you can creat a flash interface thats fine but its offtopic. If you have questions regarding JSONRPC your more than welcome to ask here, but please keep the thread on topic.

Cheers,
Tobias


- Swwethip1 - 2010-05-20

gotcha.. my bad !!


searching music data - jw76 - 2010-05-20

I see the following methods that allow minimal queries against the music db.
AudioLibrary.GetArtists true ReadData Retrieve all artists
AudioLibrary.GetAlbums true ReadData Retrieve all albums from specified artist or genre
AudioLibrary.GetSongs true ReadData Retrieve all songs from specified album, artist or genre

Are there plans to implement a method that allows finer granular searching.

eg
AudioLibrary.SearchArtist : accepts wildcard string against artist.strArtist
AudioLibrary.SearchTrack : accepts wildcard string against song.strTitle

etc..


- _Andy_ - 2010-05-21

Hello

i try to play a file by movieid. i tried
NSString *post = @"{\"jsonrpc\": \"2.0\", \"method\": \"XBMC.Play\",\"movieid\":\"2\",\"id\": 1}"; and
NSString *post = @"{\"jsonrpc\": \"2.0\", \"method\": \"XBMC.Play\", \"params\": {\"movieid\": \"2\"},\"id\": 1}";

but i only get "error" : {
"code" : -32602,
"message" : "Invalid params."
},

What i´m doing wrong?
BTW: it´s hard for me to find the correct params for the methods. The developer site shows too few infos. Where can i find more details?


- _Andy_ - 2010-05-23

ok. i get it to work now.

but one big question for me. i dont use the video library function of xbmc.
i only add the shares i want to browse. so i have no movies in the database i can query.
e.g. i add 2 shares to video section (i name them myvideos, mytvshows)
myvideos points to f:\vidz and mytvshows points to z:\shows.
how can i query these names in json-rpc and how can i browse them?

i know the Files.GetDirectory but for this method i need to know the drive letters in the system. and for security reason i only want to browse in "myvideos" and "mytvshows"

i found a user project "XBMControl" and it shows only the share names (parted in video,music,pictures,files) but it seems to use the old api.
is this possible with json-rpc too?


- topfs2 - 2010-05-23

Files.GetSources

Param is "media": "foo" were foo can be video, music, pictures or files.