diff options
author | Max Kellermann <max@duempel.org> | 2008-09-18 01:57:34 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-18 01:57:34 +0200 |
commit | 97aa8b3d2af61beab67ca4882251ce68582b95b6 (patch) | |
tree | 7bb0b83453c4a8c160348bea8987a33dfaca3894 /src/playlist.c | |
parent | fe8895120e565f83f18fb3c0af7a0bbbc881e5d9 (diff) | |
download | mpd-97aa8b3d2af61beab67ca4882251ce68582b95b6.tar.gz mpd-97aa8b3d2af61beab67ca4882251ce68582b95b6.tar.xz mpd-97aa8b3d2af61beab67ca4882251ce68582b95b6.zip |
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.
Diffstat (limited to 'src/playlist.c')
-rw-r--r-- | src/playlist.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/playlist.c b/src/playlist.c index 76a448ba2..919b4c34f 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); |