Fix BasePlaybackController with respect to test_next_with_consume

This commit is contained in:
Thomas Adamcik 2010-04-06 22:38:39 +02:00
parent b77311e162
commit d1e5bafc5b

View File

@ -453,12 +453,17 @@ class BasePlaybackController(object):
def next(self):
"""Play the next track."""
original_track = self.current_track
if self.next_track is not None and self._next(self.next_track):
self.current_track = self.next_track
self.state = self.PLAYING
elif self.next_track is None:
self.stop()
if self.consume:
self.backend.current_playlist.remove(original_track)
def _next(self, track):
return self._play(track)