When loading a new playlist, reset the current song pos, and if state==PLAY play the first song in the new list

This commit is contained in:
Stein Magnus Jodal 2010-02-06 03:37:58 +01:00
parent 1c75716a39
commit 19bd58f342

View File

@ -205,9 +205,12 @@ class BaseBackend(object):
return None
def playlist_load(self, name):
self._current_song_pos = None
matches = filter(lambda p: p.name == name, self._playlists)
if matches:
self._current_playlist = matches[0]
if self.state == self.PLAY:
self.play(songpos=0)
else:
self._current_playlist = None