aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-05-28 23:23:32 +0200
committerMax Kellermann <max@duempel.org>2009-05-28 23:23:32 +0200
commit4e8208717bf8cdc46f4a5f04412c4cdf590ce59e (patch)
tree373cc0e32fa187092f3a0e83e39386d4954b6fe2
parent6e3bd4f620022f5a6a1a464170fba1bdfa242e7e (diff)
downloadmpd-4e8208717bf8cdc46f4a5f04412c4cdf590ce59e.tar.gz
mpd-4e8208717bf8cdc46f4a5f04412c4cdf590ce59e.tar.xz
mpd-4e8208717bf8cdc46f4a5f04412c4cdf590ce59e.zip
playlist: reset "current song" when playlist ends
Commit f78cddb4 introduced a regression: when the playlist reached its end, MPD did not reset the "current song" pointer anymore after stop. Add a "current = -1" code line.
-rw-r--r--src/playlist_control.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/playlist_control.c b/src/playlist_control.c
index f96db7f0e..4359611fd 100644
--- a/src/playlist_control.c
+++ b/src/playlist_control.c
@@ -158,6 +158,9 @@ nextSongInPlaylist(struct playlist *playlist)
playlist->queue.single = false;
/* no song after this one: stop playback */
stopPlaylist(playlist);
+
+ /* reset "current song" */
+ playlist->current = -1;
}
else
{