queue_set_index

🟡 Incomplete

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


Set the current Song to a queue index.

If the index is out-of-bounds (queue has 10 songs, index is 10 or greater), this method will do nothing.

Inputs

FieldTypeDescription
indexunsigned integerAn index in the queue (1st Song is index 0, 2nd Song is index 1, etc). The current state of the "queue" can be viewed with state_audio.

Outputs

FieldTypeDescription
out_of_boundsbooleanIf the provided index was equal to or greater than the queue length.
indexunsigned integerThe provided index
queue_lenunsigned integerThe queue length

Example Request

Set the current Song to index 4.

festival-cli queue_set_index --index 123
curl http://localhost:18425 -d '{"jsonrpc":"2.0","id":0,"method":"queue_set_index","params":{"index":123}'

Example Response

{
  "jsonrpc": "2.0",
  "result": {
    "out_of_bounds": true,
    "index": 123,
    "queue_len": 0
  },
  "id": 0
}