Kodi Community Forum

Full Version: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Montellesse, is there a way to go directly to a playlist with json, e.g. John's 5 Stars
Define "go directly to a playlist". Do you want to play it or do you want to get it's content in your remote application or do you want to show it's content in the XBMC user interface?
(2013-01-14, 00:10)Montellese Wrote: [ -> ]Define "go directly to a playlist". Do you want to play it or do you want to get it's content in your remote application or do you want to show it's content in the XBMC user interface?

Sorry I didn't specify. I want to play it
If you know the exact path of the playlist, you should be able to pass it to Player.Open in the "file" property of the "item" parameter. Is it a smartplaylist or a custom m3u?
(2013-01-14, 00:16)Montellese Wrote: [ -> ]If you know the exact path of the playlist, you should be able to pass it to Player.Open in the "file" property of the "item" parameter. Is it a smartplaylist or a custom m3u?

It is a smart playlist created in XBMC named John's 4 Stars
Is there any command to cycle through viewTypes? I don't see one in the wiki.
Montellesse, I tried this, but no success

Code:
{"jsonrpc": "2.0", "method": "Player.Open", "params": { "item" : [ "playlistid" : 0 ] }, "id": 1 }

I'm not sure how to populate the
Code:
[ "playlistid" : 0 ]
portion of the json command

Like I've stated previously, the playlist is a smart playlist that I created in XBMC and named "John's 4 Stars"
I also went back and tried this
Code:
{ "jsonrpc": "2.0", "method": "Player.Open", "params": { "item": { "file": { "C:/Users/Livingroom/AppData/Roaming/XBMC/userdata/playlists/music/John's 4 Stars.xsp" } } }, "id": 1 }

Still no luck
You need to open "special://musicplaylists/John's 4 Stars.xsp"
Is there a way to detect that the current player is full screen and if osd is shown or not ?
Info boolean for fullscreen VideoPlayer.IsFullscreen http://wiki.xbmc.org/index.php?title=Lis...Conditions I think you may be out of luck on the OSD.
Thanks, so I guess there's no way to have one button behave differently between osd and fullscreen apart custom keymaps.
(2013-01-14, 08:32)Tolriq Wrote: [ -> ]You need to open "special://musicplaylists/John's 4 Stars.xsp"

Figured it out, thanks
It looks like JSONRPC stops responding when you Activate the Peripherals window. With the Peripherals window open JSONRPC.Ping stops responding, exiting the dialog in the GUI allows it to respond again.

Has this been reported? I did a few quick searches but didn't come up with anything....
Hi,

Code:
{"id":1,"jsonrpc":"2.0","method":"AudioLibrary.GetAlbums","params":{"filter":{"and":[{"field":"album","operator":"contains","value":"pump"},{"artistid":6 }]},"limits":{"start":0,"end":6 }},"properties":["artist","thumbnail","genre","year"]}}

Returns

"Received value does not match any of the union type definitions"

I am trying to search for a specific album name for artistid:6

Individually the filters work, but when and is used it fails with the above message

Any suggestions? Thanks in advance

You are mixing your filters in a way not supported.

Code:
{"jsonrpc": "2.0", "id": 1, "method": "audioLibrary.Getalbums", "params": { "sort": { "order": "ascending", "method": "album", "ignorearticle": true }, "properties": ["artist", "genre", "rating", "thumbnail", "year", "mood", "style"], "filter":  { "and": [ {"field": "albumartist", "operator": "is", "value": "future of the left"}, {"field": "album", "operator": "is", "value": "curses"} ] } } }

Something like that you are trying to do? Artist is "future of the left" AND album is "curses"?

Little pimp here. If you want an easy way to get advanced search use AWXi advanced search and capture the command in debug. As I did for the above.