aboutsummaryrefslogtreecommitdiffstats
path: root/src/queue
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-04-10 13:49:20 +0200
committerMax Kellermann <max@duempel.org>2014-04-10 13:49:20 +0200
commit1c02b4b9f4147521d466e14784c5f3cc14b7f6a9 (patch)
tree27bd7c746a3f0dbe80d24a157e9225491bd3d280 /src/queue
parentafdefefbe4b39ddcca8b9fedd37cafdc949cc3d5 (diff)
parentd0119548c116ae038b1a1f625f11c4815d3a4bd8 (diff)
downloadmpd-1c02b4b9f4147521d466e14784c5f3cc14b7f6a9.tar.gz
mpd-1c02b4b9f4147521d466e14784c5f3cc14b7f6a9.tar.xz
mpd-1c02b4b9f4147521d466e14784c5f3cc14b7f6a9.zip
Merge tag 'release-0.18.10'
Diffstat (limited to 'src/queue')
-rw-r--r--src/queue/PlaylistEdit.cxx18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/queue/PlaylistEdit.cxx b/src/queue/PlaylistEdit.cxx
index ef409a260..e8f1a178f 100644
--- a/src/queue/PlaylistEdit.cxx
+++ b/src/queue/PlaylistEdit.cxx
@@ -204,12 +204,8 @@ playlist::DeleteInternal(PlayerControl &pc,
if (playing && current == (int)songOrder) {
const bool paused = pc.GetState() == PlayerState::PAUSE;
- /* the current song is going to be deleted: stop the player */
-
- pc.Stop();
- playing = false;
-
- /* see which song is going to be played instead */
+ /* the current song is going to be deleted: see which
+ song is going to be played instead */
current = queue.GetNextOrder(current);
if (current == (int)songOrder)
@@ -218,10 +214,12 @@ playlist::DeleteInternal(PlayerControl &pc,
if (current >= 0 && !paused)
/* play the song after the deleted one */
PlayOrder(pc, current);
- else
- /* no songs left to play, stop playback
- completely */
- Stop(pc);
+ else {
+ /* stop the player */
+
+ pc.Stop();
+ playing = false;
+ }
*queued_p = nullptr;
} else if (current == (int)songOrder)