Volumio2
Volumio2 copied to clipboard
Websocket api pushPlayerState returns "stream" as boolean or string
Hi!
pushPlayerState seems to return "stream" parameter as boolean in tidal service and string in spotify service, this will cause unnessary work to get the responses parsed to typesafe objects.
what should be the real use case for this parameter?
Here are the relevant JSON responses, which i forgot to add before.
When playing from tidal
{ "status": "play", ....... "stream": false, <-- Boolean as in True or false ...... "volatile": false }
Now when we play from spotify the response is
"status": "play", ....... "stream": "spotify", <-- Not so much Boolean here anymore ...... "service": "spop"
In my opinion this should be corrected one way or other, since response's like these causes issues for type safe languages, yes you can work around this, but it could be fixed in the backend instead of fixing it in every client application/front end.