core: Add volume arg to volume_changed() event

It was already called with the argument, and both the MPD and HTTP frontends
handled it/expected it. It was just the default implementation in CoreListener
that lacked the argument.
This commit is contained in:
Stein Magnus Jodal 2013-10-09 23:51:01 +02:00
parent 158b2344ff
commit 447864774e
2 changed files with 5 additions and 2 deletions

View File

@ -132,11 +132,14 @@ class CoreListener(object):
"""
pass
def volume_changed(self):
def volume_changed(self, volume):
"""
Called whenever the volume is changed.
*MAY* be implemented by actor.
:param volume: the new volume in the range [0..100]
:type volume: int
"""
pass

View File

@ -49,7 +49,7 @@ class CoreListenerTest(unittest.TestCase):
self.listener.options_changed()
def test_listener_has_default_impl_for_volume_changed(self):
self.listener.volume_changed()
self.listener.volume_changed(70)
def test_listener_has_default_impl_for_seeked(self):
self.listener.seeked(0)