jishi / node-sonos-discovery

Simplified framework for Sonos built on node.js
MIT License
146 stars 75 forks source link

Switch preset with out changing volume. #42

Closed sorahn closed 8 years ago

sorahn commented 8 years ago

I was looking at the applyPreset code to see if we could tweak it to use the current volume from each zone it's going to set if there is no volume set in the preset.

Right now it just dumps in 0 so if you don't set a volume you get nothing.

My thoughts were to have it check all the volumes right before the 'pauseall' (line 572) and keep a list of all the current player volumes. Then when you go to set volume, check to see if there was a volume in the preset. If so, use that, if not, use the current volume.

Thoughts?

jishi commented 8 years ago

Hi, it would be simpler to just identify if volume of undefined in the preset, and skip the volume call altogether. To be honest, that is what I would have expected to happen, so it feels more like a bug than expected behavior.

jishi commented 8 years ago

Fixed with 0.15.6