Playlist.add current gui selection
#1
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!
Reply
#2
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.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
Any progress with this? I would also like to get "add to playlist" going for music.
Reply
#4
@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.
Reply
#5
(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.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply

Logout Mark Read Team Forum Stats Members Help
Playlist.add current gui selection0