Closed mpeterson2 closed 10 years ago
I can look into it tomorrow/when I wake up.
It might now...
Let me take a look.
So ... the server will automatically start playing, but the frontend doesn't update. Similarly, when the queue is empty, the server now adds a random song, the client doesn't know to update and doesn't play the newly added song...
Yeah, I'm not sure how we are going to be able to do this. We may be able to set it up a stream if you can figure that out. We can request from /upcoming
and you can stream updates to use?
If I can't figure what out? If either mpd is stopped, with a playlist, or doesn't have a playlist, if you add a song, it will start playing.
This is new as of five minutes ago.
Okay, I read your comment wrong.
We could send back more than just the "note: song added" in that case. We could add a "command" field, which tells the client things (like: refresh everything
)...
Well we need to be able to hear when other clients add things as well.
By figure it out, I meant if you can figure out how to keep the connection alive and send the playlist to the browser when there is an update.
Thought: if the server starts up and MPD isn't playing, have it randomly select a song (like it does when the queue runs out). Problem averted.
Sounds good.
If there are no songs in the playlist to start with and you add a to the playlist, you have to tell MPD to play before you can pick up the stream again.
Likewise on the frontend, you have to refresh the page in order to get the stream to work again.