volumio / Volumio2

Volumio 2 - Audiophile Music Player
http://volumio.org
Other
1.37k stars 315 forks source link

Disable repeatSingle when repeat is disabled #2117

Closed Joni-Salminen closed 3 years ago

Joni-Salminen commented 3 years ago

repeat single does not work alone, since its nested inside repeat checks and coupled with it in other checks, so it should be set false when repeat is disabled. Currently "pushState" can emit "repeatSingle == true", but if repeat is false, we are not repeating single track, so the state is wrong.

I believe this is more of correcting the state sent to listeners, real fix would be to allow repeatSingle actual repeat the single song when its set, i can look into that if its more preferred way?

xipmix commented 3 years ago

Looks nice and simple but it prompts questions: What version is this occurring on? Can you describe a simple way to reproduce what you are seeing? It would help me understand this issue better.

Also for a short series like this it helps clarity if you can rebase before pushing to your fork, or just cherry-pick the changes that were actually needed into a new branch. I often do a 'git diff master -- .js' and use that to work out the final series of commits I need.

Joni-Salminen commented 3 years ago

It's occuring on latest official release 2.882.

I don't think it's possible to reproduce it via the webcontrol UI, i did find this out when developing native android client/websocket library for Android, if you try to enable "repeatSingle" without enabling "repeat" with the command "setRepeat", then the pushState event emits "repeatSingle:true" but it's not actually enabled.