From 19bd58f3428e973045c1fb4d75aa347ee89889f2 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sat, 6 Feb 2010 03:37:58 +0100 Subject: [PATCH] When loading a new playlist, reset the current song pos, and if state==PLAY play the first song in the new list --- mopidy/backends/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mopidy/backends/__init__.py b/mopidy/backends/__init__.py index d087a241..a98be901 100644 --- a/mopidy/backends/__init__.py +++ b/mopidy/backends/__init__.py @@ -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