Websocket addToQueue

Hi, I am trying to add a track from a playlist to the queue, but nothing happens.

As an example, I send the following message:

42["addToQueue",{"uri":"http://icecast.omroep.nl/radio1-bb-mp3"}]

The uri is taken from what is given in the playlist struct that I receive.
So what format does it actually expect?

Hi GForce,

Here it is:

 curl -i --header "Content-Type: application/json" localhost:3000/api/v1/replaceAndPlay --data '{
  "service": "webradio",
  "type": "webradio",
  "title": "Radio1 (rename as you prefer",
  "uri": "http://icecast.omroep.nl/radio1-bb-mp3",
  "albumart": "https://www.nporadio1.nl/svg/npo_radio1_logo.svg"
}'

Credits: Play a radio url via curl? - #12 by ashthespy

Have a great sunday!

Luca
radio1.txt (312 Bytes)

I see you are using a raw websocket – you would need to call the replaceAndPlay endpoint as suggested about :slight_smile:

42["replaceAndPlay",{"service":"webradio","type":"webradio","title":"Radio 1","uri":"
http://icecast.omroep.nl/radio1-bb-mp3","albumart":"https://www.nporadio1.nl/svg/npo_radio1_logo.svg"}]

Hi guys, thanks for the help!!
So then the documentation is actually incomplete, it needs the entire track info dictionary, and not only uri

Look at the source code found from GitHub rather than the documentation, there is a lot of undocumented stuff in there.

Thanks for the tip!
Although I have to admit, looking at the source code now it is not immediately clear to me it should be the entire dictionary :sweat:

I do have most of it sorted out for my app, just ask if you can’t figure out something and I’m happy to help you where i can.

1 Like

Thanks, that would be very nice!
I have to say, your app looks very good! :smiley: