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)



- divingmule - 2011-02-16

I was wondering if we could get an AddToSlideshow and a ClearSlideshow ?


- Montellese - 2011-02-16

panzaeron Wrote:@Montelese
I do the following:
Code:
curl -s -S -m 3 -X POST -d '{"jsonrpc": "2.0", "method": "AudioPlaylist.Add", "params": { "playlist-file" : "/home/xbmc/.xbmc/userdata/playlists/music/Radio.m3u"}, "id": 1}' http://192.168.0.24:8080/jsonrpc
Result:
Code:
{
   "id" : 1,
   "jsonrpc" : "2.0",
   "result" : "OK"
}
Could you upload/send me that m3u file so I can test it myself?

divingmule Wrote:I was wondering if we could get an AddToSlideshow and a ClearSlideshow ?
Please create a feature request on our trac.


- panzaeron - 2011-02-16

@Montellese
The content of the m3u-file is equal, with streams or with mp3-files nothing works...

Here is a link to the Radio.m3u-File: Radio.m3u

But if the steps are ok, so could this a problem with my xbmc-installation? I use Ubuntu karmic with the dharma pvr version from dushmaniac...


- archizor - 2011-02-18

Hi!

I would like to know the fields i need to use to Get the status Watched / unwatched for the Movies en Tvshows saeson and tvshow episode ?

Could you help ?

thank's


- Montellese - 2011-02-18

archizor Wrote:I would like to know the fields i need to use to Get the status Watched / unwatched for the Movies en Tvshows saeson and tvshow episode ?

IIRC this info is currently not available through json rpc. Please create a feature request ticket on Trac.


- grywnn - 2011-02-19

archizor Wrote:I would like to know the fields i need to use to Get the status Watched / unwatched for the Movies en Tvshows saeson and tvshow episode ?
Use the field "playcount", and check if it's > 0.
Works for me even on tvshow and season level.


How do I remove one specific playlist item? - grifter - 2011-02-20

It’s almost 1:00AM here and I have been at this for hours. Forgive me if this is a stupid question but I thoroughly read this thread and the documentation as well as searched Google endlessly.

How do I remove one specific playlist item?

I need a way to remove one index out of the "VideoPlaylist" and I can’t find a command that would be equivalent to "Playlist.Remove". I think part of my confusion is that I don’t know what the difference between "VideoPlaylist" and "Playlist" are. Maybe there is a parameter for “VideoPlaylist.clear” to specify a specific item?

Also does anyone know how can i turn on subtitles Via JSON_RPC? and how can i turn off subtitles Via JSON_RPC?


- wuench - 2011-02-20

Tolriq Wrote:For those you can use eventserver Smile Works well even if all JSON would be better.

Does the Eventserver trigger the sound effects too, just like you were sending them from the keyboard? The HTTP Action commands don't.

If possible, it would be great if the Action commands are added to JSONRPC they should trigger the sound effects.


- dann0 - 2011-02-21

grifter Wrote:It’s almost 1:00AM here and I have been at this for hours. Forgive me if this is a stupid question but I thoroughly read this thread and the documentation as well as searched Google endlessly.

How do I remove one specific playlist item?

I need a way to remove one index out of the "VideoPlaylist" and I can’t find a command that would be equivalent to "Playlist.Remove". I think part of my confusion is that I don’t know what the difference between "VideoPlaylist" and "Playlist" are. Maybe there is a parameter for “VideoPlaylist.clear” to specify a specific item?

Also does anyone know how can i turn on subtitles Via JSON_RPC? and how can i turn off subtitles Via JSON_RPC?

Along the same lines, i would like to know how to start playing the AudioPlaylist at a specified item, not the first item. Smile


- Montellese - 2011-02-21

Ok as a lot of people are having problem using/modifying playlists over json rpc:

The current playlist implementation/representation in json rpc has many (design) flaws and there are lots of unsupported things and it will hopefully be completely rewritten for the next release (if there's enough time). Until then it might be the safest approach not to use the Playlist methods (except SkipPrevious, SkipNext, GetItems, Clear, Shuffle and UnShuffle which should work as expected).

We're sorry for the inconvenience and hope to provide a much better solution in the next version Wink


- archizor - 2011-02-21

grywnn Wrote:Use the field "playcount", and check if it's > 0.
Works for me even on tvshow and season level.
Thx man Smile


- archizor - 2011-02-21

hi,

i would like to know all the xbmc Announcement like

{"jsonrpc" : "2.0","method" : "Announcement","params" : {"message" : "ApplicationStop","sender" : "xbmc" }

Do you know if there is a list somewhere on the "clouud" ? Smile


- grifter - 2011-02-22

dann0 Wrote:Along the same lines, i would like to know how to start playing the AudioPlaylist at a specified item, not the first item. Smile


Dann0 I think this should work (I have not tested this but the documentation says it should)

{"jsonrpc": "2.0", "method": "AudioPlaylist.Play", "param" : 1,"id": 1}

the value of param is the index of the item to play.


- grywnn - 2011-03-01

One more thing for the playlist todo list: Smile
if you add some music to the music playlist by (pseudocode) AudioPlaylist.Add(songid:123) or simply start playback with a XBMC.Play(songid:123), fanart info isn't available through the MusicPlayer.Property(Fanart_Image) info label.
It does show up correctly in AudioPlaylist.getItems, so i'd guess its just the info label that doesn't get set up properly.


- gertjanzwartjes - 2011-03-01

grywnn Wrote:Hi everyone,

i've just stumbled over a strange bug:
"Player.GetActivePlayers" times out if an addon has the virtual keyboard opened.

How to reproduce:
- Take an addon with an integrated search feature, like YouTube
- In the youtube addon, got to Search->Search...
- the virtual keyboard will pop up.
- now, with the keyboard opened, use your favorite script / curl whatever and do a Player.GetActivePlayers => timeout.
- close the keyboard and everything's back to normal.

I've tested this with different addons, same result.

I don't know if this is JSON or rather core related (suspect the later one), but i thought i'd post it here anyway.

Edit:
Tested with XBMC 10.0 running on OS X
I can confirm the behaviour as grywnn describes. It's actually more general. If an addon opens a keyboard window, all HTTP commands to XBMC will time out until the keyboard window is closed. This is not JSON-RPC specific, HTTP API commands will fail alike.

Unfortunately, because this issue is so generic, this renders all remote control applications unusable when a keyboard window is opened from an addon. I'll update the trac ticket opened by grywnn as well.