queue_add_playlist
🟡 Incomplete
This API's output may have additions in the future.
Add a Playlist to the queue.
Inputs
| Field | Type | Description |
|---|---|---|
| playlist | string | The Playlist's name |
| append | string, one of front, back or index | See Queue/Append |
| clear | optional (maybe-null) boolean | Should the queue be cleared before adding? |
| play | optional (maybe-null) boolean | Should we start playing? |
| index | optional (maybe-null) unsigned integer | If the index append is chosen, this will be the index used |
| offset | optional (maybe-null) unsigned integer | See Queue/offset |
Outputs
result: null if everything went ok.
error: ... if there was an index/offset error or if the playlist didn't exist.
Example Request 1
Add to back of the queue.
festival-cli queue_add_playlist --playlist my_playlist --append back
curl http://localhost:18425 -d '{"jsonrpc":"2.0","id":0,"method":"queue_add_playlist","params":{"playlist":"my_playlist","append":"back","clear":false,"play":false}}'
Example Request 2
Insert at queue index 4, start from Song 3 (offset 2).
festival-cli queue_add_playlist --playlist my_playlist --append index --index 4 --offset 2
curl http://localhost:18425 -d '{"jsonrpc":"2.0","id":0,"method":"queue_add_playlist","params":{"playlist":"my_playlist","append":"index","clear":false,"play":false,"index":4,"offset":2}}'
Example Request 3
Clear the queue, add starting from Song 5 (offset 4).
festival-cli queue_add_playlist --playlist my_playlist --append front --clear --play --offset 4
curl http://localhost:18425 -d '{"jsonrpc":"2.0","id":0,"method":"queue_add_playlist","params":{"playlist":"my_playlist","append":"front","clear":true,"play":false,"offset":4}}'
Example Response
{
"jsonrpc": "2.0",
"result": null, // <--- everything went ok.
"id": 0
}