aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-23 16:17:21 +0100
committerMax Kellermann <max@duempel.org>2009-01-23 16:17:21 +0100
commit276843edd5033e6dd4a708d3a8bbc29a6bfafc92 (patch)
tree54c1f41740b1707b36ff0e4963b2c16da5d20f36 /src
parent032640f9e5427fa321827ae2b14b3066170c8fb7 (diff)
downloadmpd-276843edd5033e6dd4a708d3a8bbc29a6bfafc92.tar.gz
mpd-276843edd5033e6dd4a708d3a8bbc29a6bfafc92.tar.xz
mpd-276843edd5033e6dd4a708d3a8bbc29a6bfafc92.zip
playlist: don't unpause on delete
When you delete a song from the playlist which was paused, MPD forgot that it was paused and started playing the next song.
Diffstat (limited to '')
-rw-r--r--src/playlist.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/playlist.c b/src/playlist.c
index 61c02f916..49e5cc672 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -647,6 +647,8 @@ enum playlist_result deleteFromPlaylist(unsigned song)
clearPlayerQueue();
if (playlist.playing && playlist.current == (int)songOrder) {
+ bool paused = getPlayerState() == PLAYER_STATE_PAUSE;
+
/* the current song is going to be deleted: stop the player */
playerWait();
@@ -658,7 +660,7 @@ enum playlist_result deleteFromPlaylist(unsigned song)
if (playlist.current == (int)songOrder)
playlist.current = -1;
- if (playlist.current >= 0)
+ if (playlist.current >= 0 && !paused)
/* play the song after the deleted one */
playPlaylistOrderNumber(playlist.current);
else