Is there a possibility to start a Radio-Station URL via the REST API?
Nobody an idea?
If it’s already in the queue then you can just play it via the API, but I can’t see anything in the documentation about adding a radiostation to the queue.
After lots of programming time & experiments I found the SocketIO interface more reliable than the REST API. There is an undocumented API I found from another topic problems-adding-webradio-via-websocket-api-t5164.html
In Python I perform something like this:
with SocketIO('127.0.0.1, 3000.__PORT, LoggingNamespace) as socketIO:
socketIO.on('pushState', self.__on_pushState_reply)
socketIO.emit('clearQueue', '', self.__dummy_callback)
socketIO.emit('addPlay', {'status':'play', 'service':'webradio', 'uri':uri}, self.__dummy_callback)
socketIO.wait_for_callbacks(seconds = 1)
My idea:
Create a playlist for each radio station you need and then start the playlist with the playplaylist endpoint. Works just fine for me.