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)



- KnisterPeter - 2010-12-16

Ok, I get your point, I just wanted to build a api/app layer to remote control xbmc without need to install any proxy, but maybe i could create one using the python scripting interface of xbmc. That way one could at least install the server side proxy as part of xbmc and do not need to have any other server software to install.

Anyway I will go with a proxy solution then...


- Tolriq - 2010-12-16

Well for the moment the json rpc is still not jsonrpc compliant Smile

http://trac.xbmc.org/ticket/10095


- vaton4 - 2010-12-17

Extract from the JSONRPC source says:
Code:
{ "AudioPlaylist.Insert",  CAVPlaylistOperations::Insert,  Response,  ControlPlayback,  "Insert item(s) into playlist" },
{ "AudioPlaylist.Remove",  CAVPlaylistOperations::Remove,  Response,  ControlPlayback,  "Remove entry from playlist" },
but JSONRPC.Introspect does not show that AudioPlaylist.Insert and AudioPlaylist.Remove commands exist.

On URL http://wiki.xbmc.org/index.php?title=JSON_RPC#AudioPlaylist.Add AudioPlaylist.Insert and AudioPlaylist.Remove description completely missing.

Found also this:
marksoccer Wrote:How can I remove files from the current playlist? I can jump to a file in the playlist by using AudioPlaylist.Play with an index. However, when I use AudioPlaylist.Remove with an index, nothing happens. I also tried Playlist.Remove with no luck. Has this feature been implemented yet?
grywnn Wrote:+1 for this.
Although i see a CAVPlaylistOperations::Remove in AVPlaylistOperations.cpp, i get a "Method not found" when trying to call AudioPlaylist.Remove in RC1
but no other feedback.

Are these commands implemented? If yes, would somebody explain how to use them? Sure, names are selfexplaining, but what about params? How to specify WHERE and WHAT insert, WHAT to remove?

And finally -- would somebody precise the wiki page to reflect latest functionality of XBMC JSON-RPC?


- topfs2 - 2010-12-17

Tolriq Wrote:Well for the moment the json rpc is still not jsonrpc compliant Smile

http://trac.xbmc.org/ticket/10095

hehehe. ssssh Smile But tbh thats one of the reasons why I think its important that we strive to be compliant.

@KnisterPeter Could you explain in a bit more detail what you wanted to do so I'm sure I follow. You want to have xbmc on computer A and server and interface on computer B? I guess its to shield xbmc from internet facing server?


- Montellese - 2010-12-17

topfs2 Wrote:hehehe. ssssh Smile But tbh thats one of the reasons why I think its important that we strive to be compliant.
When my semester is finished and my exams are over I'd be willing to take a shot at this problem. The better the JSON RPC is the easier it is for other people to use it.


- KnisterPeter - 2010-12-18

topfs2 Wrote:@KnisterPeter Could you explain in a bit more detail what you wanted to do so I'm sure I follow. You want to have xbmc on computer A and server and interface on computer B? I guess its to shield xbmc from internet facing server?

What I want to do is open some html file regardless of the protocol (one of http, https or even file). Because of that there is a cross-browser border from file://... to http://xbmc-host and I could not POST anything there.

This problem will probably not exist on mobile devices, but I'm not sure about that. At least for development of an app it is extremly helpful to allow cross-domain scripting via xbmc.


More announcements/event broadcast - ndeshmukh - 2010-12-21

Are there any plans to add more announcements?

I was specifically looking for announcements for screen saver activation and deactivation.

Thanks.


- topfs2 - 2010-12-21

ndeshmukh Wrote:Are there any plans to add more announcements?

I was specifically looking for announcements for screen saver activation and deactivation.

Thanks.

Post a trac ticket with the announcements you want and specify when they should occur and what you expect them to contain.

Screensaver activation sounds like a good idea to have for sure.


- ndeshmukh - 2010-12-21

Just did that.

http://trac.xbmc.org/ticket/10937

Hoping to see it soon enough. I get yelled at when the tv is left on after use or while music is playing. So now XBMC will be able to switch that off for me using the rs232.

Thanks


- vaton4 - 2010-12-22

MKay Wrote:....
1. Playlist.Remove does not work (The other people already mentioned that. Rolleyes ).
It would be nice if this would be implemented.
....
3. It's possible to add a folder to the playlist:
'{"method": "AudioPlaylist.Add", "params": { "file": "/media/usb/mp3" }}'

But the API will not add the files (inside the folder) itself to the playlist.

4. I use the following code to add a file to the playlist:
'{"method": "AudioPlaylist.Add", "params": { "file": "/media/usb/mp3/track.mp3" }, "id": 1}'

This works fine, but then AudioPlaylist.GetItems returns no song-information like artist, label etc. with this command:
'{"method": "AudioPlaylist.GetItems", "params": { "fields": ["title", "album", "artist", "duration"] }}'
....
i want to play for example music from an usb-stick without adding the files to the database ;-)
The old HTTP API had a method for this: AddToPlayList(...).

Has been this problem solved yet?

I'm working on simple player (no video, no library access, just shared music browser and audio player) and must say that adding files from the directory subtree (recurently) using AudioPlaylist.Add is a nightmare. Implementation of the xbmcHttp?commmnad=AddToPlayList in the JSON-RPC would be really helpfull.

Interface seems to be developed just with XBMC library users in mind. Please remember many users don't use library, just play files on removable HDs, USBs, data CD/DVDs ...


Access Thumb URL - seedzero - 2010-12-22

I'm currently writing a perl script for email notification and was wondering if there's a way to access the URL for the episode thumb. When I look in the SQL database, the information is there in c06, I'm just not sure if it's possible to extract via JSON RPC. The SQLite DB contains:

Code:
<thumb>http://thetvdb.com/banners/episodes/75978/534591.jpg[/b]</thumb>

What I get from the default query:

Code:
special://masterprofile/Thumbnails/Video/8/8ada3962.tbn.

The thumb that's currently pulled is the local .tbn

Code:
my $callobj = {
  'method'  => 'VideoLibrary.GetRecentlyAddedEpisodes',
  'params'  => { 'fields'=>['plot','rating','showtitle','season','episode','firstaired'] },    
  id  => "1",
  jsonrpc => "2.0",
};



- SVLD - 2010-12-22

is it possible to show notification window, using JSONRPC in XBMC?

I mean, where is replacement of builtin function "notification"?


- Montellese - 2010-12-22

SVLD Wrote:is it possible to show notification window, using JSONRPC in XBMC?

I mean, where is replacement of builtin function "notification"?

Currently this is not supported. Check Trac if there already is a ticket for it and if not create one and mention the functions you think are missing.


- KnisterPeter - 2010-12-22

Is there a way to control the tv-plugins? I know they are not in trunk but should be merged soon, so it would be awesome to have them supported :-)


- Montellese - 2010-12-22

KnisterPeter Wrote:Is there a way to control the tv-plugins? I know they are not in trunk but should be merged soon, so it would be awesome to have them supported :-)

What do you mean by "tv-plugins"? The PVR functionality which is being developed in the pvr testing branch? If so the roadmap of XBMC states that it won't even make it into the next major release (Eden) so it does not look like it will be merged into trunk "soon" (depending on the definition of soon).