mirror of
https://github.com/beetbox/beets.git
synced 2026-01-30 12:02:41 +01:00
bpd: don't send volume if zero in status
This commit is contained in:
parent
f8a2c22e8d
commit
5b0a02eb31
2 changed files with 4 additions and 2 deletions
|
|
@ -309,7 +309,6 @@ class BaseServer(object):
|
|||
playlist, playlistlength, and xfade.
|
||||
"""
|
||||
yield (
|
||||
u'volume: ' + six.text_type(self.volume),
|
||||
u'repeat: ' + six.text_type(int(self.repeat)),
|
||||
u'random: ' + six.text_type(int(self.random)),
|
||||
u'consume: ' + six.text_type(int(self.consume)),
|
||||
|
|
@ -319,6 +318,9 @@ class BaseServer(object):
|
|||
u'mixrampdb: ' + six.text_type(self.mixrampdb),
|
||||
)
|
||||
|
||||
if self.volume > 0:
|
||||
yield u'volume: ' + six.text_type(self.volume)
|
||||
|
||||
if not math.isnan(self.mixrampdelay):
|
||||
yield u'mixrampdelay: ' + six.text_type(self.mixrampdelay)
|
||||
if self.crossfade > 0:
|
||||
|
|
|
|||
|
|
@ -384,7 +384,7 @@ class BPDQueryTest(BPDTestHelper):
|
|||
fields_not_playing = {
|
||||
'repeat', 'random', 'single', 'consume', 'playlist',
|
||||
'playlistlength', 'mixrampdb', 'state',
|
||||
'volume' # not (always?) returned by MPD
|
||||
'volume'
|
||||
}
|
||||
self.assertEqual(fields_not_playing, set(responses[0].data.keys()))
|
||||
fields_playing = fields_not_playing | {
|
||||
|
|
|
|||
Loading…
Reference in a new issue