From 97aa8b3d2af61beab67ca4882251ce68582b95b6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 18 Sep 2008 01:57:34 +0200 Subject: [PATCH] playlist: reset id in playlist_clear() 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/playlist.c b/src/playlist.c index 76a448b..919b4c3 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -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); -- 2.30.2