Kodi Community Forum

Full Version: Playlist.add current gui selection
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys

I've been trying for quite some time to add a "add to playlist" functionality when browsing music but i cant seem to get to right syntax of the current item in my JSON call :

Tried quite a lot :

jsonrpc?request={"jsonrpc":"2.0","id":1,"method":"Playlist.Add","params":{"playlistid":0,"item":{"file":"current"}}}
jsonrpc?request={"jsonrpc":"2.0","id":1,"method":"Playlist.Add","params":{"playlistid":0,"item":{"file":ListItem.FileNameAndPath}}}

etc

But i cant seem to get it to work. Please help!
This is not possible with a single command. You can try using XBMC.GetInfoLabels (which is deprecated) to retrieve ListItem.FileNameAndPath and then pass that path to Playlist.Add but I've never tried it myself.
Any progress with this? I would also like to get "add to playlist" going for music.
@Montellese : Missed this one but why is XBMC.GetInfoLabels deprecated ? I have not seen any info or news on that and those are needed for quite some things at the moment.
(2014-12-12, 12:30)Gilbo65 Wrote: [ -> ]Any progress with this? I would also like to get "add to playlist" going for music.
Nope, no progress on this.

(2014-12-12, 16:39)Tolriq Wrote: [ -> ]@Montellese : Missed this one but why is XBMC.GetInfoLabels deprecated ? I have not seen any info or news on that and those are needed for quite some things at the moment.
It has been deprecated since version 2 or so so basically forever in terms of the JSON-RPC API. The problem is that it's a hack and a nightmare API wise. For one there's no real definition what values are put into the result. Furthermore that data is meant to be used for skins. I know that you can get quite some information from there that isn't available otherwise but ideally it would be and when that is the case XBMC.GetInfoLabels will be gone.