Allow both VOLUME_STEP and VOLUME_SET (#20732)
* Allow both VOLUME_STEP and VOLUME_SET Seems like it should be possible to support both at the same time. * Update test to allow VOLUME_SET and VOLUME_STEPpull/20796/head
parent
59393ab085
commit
fb1da53568
|
@ -333,8 +333,7 @@ class UniversalMediaPlayer(MediaPlayerDevice):
|
|||
if any([cmd in self._cmds for cmd in [SERVICE_VOLUME_UP,
|
||||
SERVICE_VOLUME_DOWN]]):
|
||||
flags |= SUPPORT_VOLUME_STEP
|
||||
flags &= ~SUPPORT_VOLUME_SET
|
||||
elif SERVICE_VOLUME_SET in self._cmds:
|
||||
if SERVICE_VOLUME_SET in self._cmds:
|
||||
flags |= SUPPORT_VOLUME_SET
|
||||
|
||||
if SERVICE_VOLUME_MUTE in self._cmds and \
|
||||
|
|
|
@ -584,7 +584,8 @@ class TestMediaPlayer(unittest.TestCase):
|
|||
|
||||
check_flags = universal.SUPPORT_TURN_ON | universal.SUPPORT_TURN_OFF \
|
||||
| universal.SUPPORT_VOLUME_STEP | universal.SUPPORT_VOLUME_MUTE \
|
||||
| universal.SUPPORT_SELECT_SOURCE | universal.SUPPORT_SHUFFLE_SET
|
||||
| universal.SUPPORT_SELECT_SOURCE | universal.SUPPORT_SHUFFLE_SET \
|
||||
| universal.SUPPORT_VOLUME_SET
|
||||
|
||||
assert check_flags == ump.supported_features
|
||||
|
||||
|
|
Loading…
Reference in New Issue