Skip to content

Commit

Permalink
Snapshot: do not try to restore bass/treble/loudness for fixed_volume…
Browse files Browse the repository at this point in the history
… devices

Devices with fixed volume output enabled have their EQ controls locked. Attempting to set their EQ will throw a UPnP exception.
  • Loading branch information
pwt committed Dec 8, 2020
2 parents befc4f3 + 01da6c4 commit cf5cd34
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions soco/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,7 @@ def restore(self, fade=False):
)

# For all devices:
# Reinstate all the properties that are pretty easy to do
self.device.mute = self.mute
self.device.bass = self.bass
self.device.treble = self.treble
self.device.loudness = self.loudness

# Reinstate volume
# Can only change volume on device with fixed volume set to False
Expand All @@ -236,6 +232,10 @@ def restore(self, fade=False):

# now set volume if not fixed
if not fixed_vol:
self.device.bass = self.bass
self.device.treble = self.treble
self.device.loudness = self.loudness

if fade:
# if fade requested in restore
# set volume to 0 then fade up to saved volume (non blocking)
Expand Down

0 comments on commit cf5cd34

Please sign in to comment.