Code

playlist: reset id in playlist_clear()
authorMax Kellermann <max@duempel.org>
Wed, 17 Sep 2008 23:57:34 +0000 (01:57 +0200)
committerMax Kellermann <max@duempel.org>
Wed, 17 Sep 2008 23:57:34 +0000 (01:57 +0200)
The playlist is reset when the connection to the MPD server is
closed.  After a successful reconnect, we have to reload the full
playlist.  To remember this, also reset the id attribute.

src/playlist.c

index 76a448ba2fbc460e9e4a4418e48996b05106451b..919b4c34f8e045b2e9994f2cb1f8102a81662f8f 100644 (file)
@@ -41,6 +41,8 @@ playlist_clear(struct mpdclient_playlist *playlist)
 {
        guint i;
 
+       playlist->id = 0;
+
        for (i = 0; i < playlist->list->len; ++i) {
                struct mpd_song *song = playlist_get(playlist, i);