set current_track to None on clear commands - required by Sonata
This commit is contained in:
parent
818e602221
commit
5a9b141657
@ -87,6 +87,7 @@ class BaseCurrentPlaylistController(object):
|
|||||||
def clear(self):
|
def clear(self):
|
||||||
"""Clear the current playlist."""
|
"""Clear the current playlist."""
|
||||||
self.backend.playback.stop()
|
self.backend.playback.stop()
|
||||||
|
self.backend.playback.current_track = None
|
||||||
self.playlist = Playlist()
|
self.playlist = Playlist()
|
||||||
|
|
||||||
def get_by_id(self, id):
|
def get_by_id(self, id):
|
||||||
|
|||||||
@ -543,6 +543,7 @@ class CurrentPlaylistHandlerTest(unittest.TestCase):
|
|||||||
self.assertEquals(self.b.current_playlist.playlist.length, 5)
|
self.assertEquals(self.b.current_playlist.playlist.length, 5)
|
||||||
result = self.h.handle_request(u'clear')
|
result = self.h.handle_request(u'clear')
|
||||||
self.assertEquals(self.b.current_playlist.playlist.length, 0)
|
self.assertEquals(self.b.current_playlist.playlist.length, 0)
|
||||||
|
self.assertEquals(self.b.playback.current_track, None)
|
||||||
self.assert_(u'OK' in result)
|
self.assert_(u'OK' in result)
|
||||||
|
|
||||||
def test_delete_songpos(self):
|
def test_delete_songpos(self):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user