core: Add playlist to playlist_changed() event
This commit is contained in:
parent
1d9a2a23b1
commit
fd86b7173c
@ -121,6 +121,9 @@ backends:
|
|||||||
triggered :meth:`mopidy.core.CoreListener.playlist_changed`, which is
|
triggered :meth:`mopidy.core.CoreListener.playlist_changed`, which is
|
||||||
intended for stored playlists, not the tracklist.
|
intended for stored playlists, not the tracklist.
|
||||||
|
|
||||||
|
- The event :meth:`mopidy.core.CoreListener.playlist_changed` has been changed
|
||||||
|
to include the playlist that was changed.
|
||||||
|
|
||||||
**Bug fixes**
|
**Bug fixes**
|
||||||
|
|
||||||
- :issue:`218`: The MPD commands ``listplaylist`` and ``listplaylistinfo`` now
|
- :issue:`218`: The MPD commands ``listplaylist`` and ``listplaylistinfo`` now
|
||||||
|
|||||||
@ -92,11 +92,14 @@ class CoreListener(object):
|
|||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def playlist_changed(self):
|
def playlist_changed(self, playlist):
|
||||||
"""
|
"""
|
||||||
Called whenever a playlist is changed.
|
Called whenever a playlist is changed.
|
||||||
|
|
||||||
*MAY* be implemented by actor.
|
*MAY* be implemented by actor.
|
||||||
|
|
||||||
|
:param playlist: the changed playlist
|
||||||
|
:type playlist: :class:`mopidy.models.Playlist`
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from mopidy.core import CoreListener, PlaybackState
|
from mopidy.core import CoreListener, PlaybackState
|
||||||
from mopidy.models import Track
|
from mopidy.models import Playlist, Track
|
||||||
|
|
||||||
from tests import unittest
|
from tests import unittest
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ class CoreListenerTest(unittest.TestCase):
|
|||||||
self.listener.tracklist_changed()
|
self.listener.tracklist_changed()
|
||||||
|
|
||||||
def test_listener_has_default_impl_for_playlist_changed(self):
|
def test_listener_has_default_impl_for_playlist_changed(self):
|
||||||
self.listener.playlist_changed()
|
self.listener.playlist_changed(Playlist())
|
||||||
|
|
||||||
def test_listener_has_default_impl_for_options_changed(self):
|
def test_listener_has_default_impl_for_options_changed(self):
|
||||||
self.listener.options_changed()
|
self.listener.options_changed()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user