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:
parent
1c75716a39
commit
19bd58f342
@ -205,9 +205,12 @@ class BaseBackend(object):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def playlist_load(self, name):
|
def playlist_load(self, name):
|
||||||
|
self._current_song_pos = None
|
||||||
matches = filter(lambda p: p.name == name, self._playlists)
|
matches = filter(lambda p: p.name == name, self._playlists)
|
||||||
if matches:
|
if matches:
|
||||||
self._current_playlist = matches[0]
|
self._current_playlist = matches[0]
|
||||||
|
if self.state == self.PLAY:
|
||||||
|
self.play(songpos=0)
|
||||||
else:
|
else:
|
||||||
self._current_playlist = None
|
self._current_playlist = None
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user