Adding items to playlist without knowing the filename
#1
Hello.

I am creating my own rating system to evaluate songs, which I store in a DB, referencing songs by their DB id.

Now I'm trying to select some of these rated songs and I want to add them to the current playlist.

I'm trying to use JSON-RPC, namely the Playlist.Add command. The docs say that there is a 'item' argument to specify what is being added, see https://kodi.wiki/view/JSON-RPC_API/v9#Playlist.Item. All the working examples I've seen specify this through a 'file'.

Isn't there a way of specifying the song one wants to add to the Playlist through its' id?

Bye and thanks, Luís
Reply
#2
Yup. Instead of a property named "file", use movieid, episodeid, or musicvideoid for items in the video library; or artistid, albumid, songid, or genreid for items in the music library.
Reply
#3
Hi there, thanks for your help.

I've tried that and it does work.

May I suggest that this is put somewhere in the docs? Or have I overseen it?

Bye and thanks again, Luís
Reply
#4
Documenting the JSON-RPC API is kind of weird with all the things that can be done with it. This would be a good one for a few specific examples, though. I'll put that on my list.

FWIW these details are in that section you linked to, if you click "Expand" on the "JSON Schema Description" - and if you can understand the JSON Schema Description.
Reply
#5
(2019-01-21, 19:20)rmrector Wrote: Documenting the JSON-RPC API is kind of weird with all the things that can be done with it. This would be a good one for a few specific examples, though. I'll put that on my list.
Well, some examples are always welcome, but I think docs are also necessary and more useful...
Quote:FWIW these details are in that section you linked to, if you click "Expand" on the "JSON Schema Description" - and if you can understand the JSON Schema Description.
I did click the expand... But what I saw there, when it came to items, wasn't clear to me... Only now you mentioned this did I go look at it again and saw the Playlist.Item details, which are hard to interpret by someone not very familiar with JSON...

Isn't there a way of making these 'JSON Schema Descriptions' friendlier?

Thanks again, Luís
Reply

Logout Mark Read Team Forum Stats Members Help
Adding items to playlist without knowing the filename0