jishi / node-sonos-discovery

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

find zone by looking at members #67

Closed ColdFireIce closed 8 years ago

ColdFireIce commented 8 years ago

This change makes it possible to set the group volume on all players of a group, not just the coordinator.

jishi commented 8 years ago

Thanks, but this is kind of unecessary. If you want to affect a group, you can always just invoke it using the coordinator like this:

player.coordinator.setGroupVolume()

Which is what we do in the HTTP API. If player is coordinator, then player == player.coordinator so it is safe to always use coordinator.

I don't like to have loose functionality like this in the discovery api, it should rather be taken care of in an outer layer IMO. No other functions work like this, if you try to change track on a grouped member for instance, it will error out.

ColdFireIce commented 8 years ago

Ok. Sounds reasonable. I didn't think about using player.coordinator :)