LMS-Community / slimserver

Server for Squeezebox and compatible players. This server is also called Lyrion Music Server.
https://lyrion.org
Other
1.2k stars 298 forks source link

Reset song queue on player stopped and queue finished #1216

Open ml-1 opened 1 week ago

ml-1 commented 1 week ago

I saw #1213 and thought that this one might be interesting for others.

I've had this patch for some time in my tree and it's been working fine for me but I don't know if there are any other use cases that could be affected.

michaelherger commented 1 week ago

What would this add in addition to https://github.com/LMS-Community/slimserver/commit/d36d81054d9fd1cd8f2db0ca9795fe63730e1b1b?

ml-1 commented 1 week ago

d36d810 only updates the playlist CURTRACK, this patch will reset the queue so that when you press play again it will start playing the first track in the queue. Reset will also trigger GUI to jump to the first track.

michaelherger commented 6 days ago

Hehe... one of the reasons why that other change only addressed the stored playlist issue was that I'm not too familiar with the streaming controller. Your fix looks so simple, I can't believe it would be the real fix 😂. But as I said: I don't know this part of the code well. I'll hopefully find some time to look into this post 9.0 release.

ml-1 commented 6 days ago

I'm not that familiar with the whole code base that's why I put the works for me disclaimer. When I started using LMS a couple of years ago it annoyed me that the queue was not reset when the playlist finished so I did some exploration a weekend and managed to come up with this patch. Post 9.0 timeline sounds good.