playlist_remove

🟢 Stable

This API is stable since festivald v1.0.0.


Remove a Playlist.

This method errors if playlist does not exist.

Inputs

FieldTypeDescription
playliststringThe name of the Playlist to remove

Outputs

FieldTypeDescription
lenunsigned integerThe amount of Playlist Entry's this removed Playlist had
entriesarray of Playlist Entry objectsThe Playlist Entry's of the remove Playlist

Example Request

festival-cli playlist_remove --playlist Playlist 1
curl http://localhost:18425 -d '{"jsonrpc":"2.0","id":0,"method":"playlist_remove","params":{"playlist":"Playlist 1"}}'

Example Response 1

The playlist existed, it was empty, and was removed:

{
  "jsonrpc": "2.0",
  "result": {
    "len": 0,
    "entries": []
  },
  "id": 0
}

Example Response 2

The playlist existed, it contained this 1 Playlist Entry, and was removed:

{
  "jsonrpc": "2.0",
  "result": {
    "len": 1,
    "entries": [
      {
        "valid": {
          "key_artist": 67,
          "key_album": 238,
          "key_song": 2588,
          "artist": "Rex Orange County",
          "album": "Apricot Princess",
          "song": "Waiting Room"
        }
      }
    ]
  },
  "id": 0
}