🟡 Incomplete

This API's output may have additions in the future.

Add a random Song to the queue, receive it back in Entry form.

This is the same as queue_add_rand_song but returns an Entry.


appendstring, one of front, back or indexSee Queue/Append
clearbooleanShould the queue be cleared before adding?
playbooleanShould we start playing?
indexoptional (maybe-null) unsigned integerIf the index append is chosen, this will be the index used


entryEntry objectThe Song that was added to the queue, in Entry form

Example Request 1

Add to back of the queue.

festival-cli queue_add_rand_entry --append back
curl http://localhost:18425 -d '{"jsonrpc":"2.0","id":0,"method":"queue_add_rand_entry","params":{"append":"back","clear":false,"play":false}}'

Example Request 2

Insert at queue index 4.

festival-cli queue_add_rand_entry --append index --index 4
curl http://localhost:18425 -d '{"jsonrpc":"2.0","id":0,"method":"queue_add_rand_entry","params":{"append":"index","clear":false,"play":false,"index":4}}'

Example Request 3

Clear the queue, add to front of queue.

festival-cli queue_add_rand_entry --append front --clear --play
curl http://localhost:18425 -d '{"jsonrpc":"2.0","id":0,"method":"queue_add_rand_entry","params":{"append":"front","clear":true,"play":true}}'

Example Response

  "jsonrpc": "2.0",
  "result": {
    "entry": {
      "path": "/home/hinto/Music/Rex Orange County/RAINBOW/SUNFLOWER.mp3",
      "key_artist": 69,
      "key_album": 254,
      "key_song": 2738,
      "artist": "Rex Orange County",
      "album": "RAINBOW",
      "song": "SUNFLOWER"
  "id": 0