2022-05-17, 19:32
Hi,
I'm now trying to open an existing smart playlist in party mode using a json call but I cant get the syntax correct
I'm looking at the Player.Open section of https://kodi.wiki/view/JSON-RPC_API/v12#Player.Open
but I'm very confused as to how you pass some of the params particularly in this section
I have the following test script where I have tried assorted different positioning of brackets with no success, usually a parse error but I cant find anything that explains where my error actually is
if anyone could offer any corrections to what I've got wrong I'd very grateful
I'm now trying to open an existing smart playlist in party mode using a json call but I cant get the syntax correct
I'm looking at the Player.Open section of https://kodi.wiki/view/JSON-RPC_API/v12#Player.Open
but I'm very confused as to how you pass some of the params particularly in this section
Code:
{
"additionalProperties": false,
"properties": {
"partymode": {
"default": "",
"type": [
{
"enums": [
"music",
"video"
],
"type": "string"
},
{
"description": "Path to a smartplaylist (*.xsp) file",
"minLength": 5,
"type": "string"
}
]
}
},
"type": "object"
I have the following test script where I have tried assorted different positioning of brackets with no success, usually a parse error but I cant find anything that explains where my error actually is
Code:
#!/bin/sh
ipkodi="192.168.xx.yy"
portkodi=zzzz
curl -u User:password --data-binary '{"jsonrpc": "2.0", "method": "Player.Open", "params": {"item": {"properties": {"partymode": ["music", "special://playlists/music/1950s.xsp"]}}}, "id":1}' -H 'content-type:application/json;' http://$ipkodi:$portkodi/jsonrpc
if anyone could offer any corrections to what I've got wrong I'd very grateful