diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/playlist.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/playlist.c b/src/playlist.c index c6a918201..0e35bfbdb 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -677,6 +677,7 @@ enum playlist_result swapSongsInPlaylist(int song1, int song2) { int queuedSong = -1; int currentSong; + int queued_is_current = (playlist.queued == playlist.current); if (song1 < 0 || song1 >= playlist.length || song2 < 0 || song2 >= playlist.length) @@ -714,8 +715,11 @@ enum playlist_result swapSongsInPlaylist(int song1, int song2) playlist.current = song2; else if (playlist.current == song2) playlist.current = song1; + if (queued_is_current) + playlist.queued = playlist.current; } + queueNextSongInPlaylist(); incrPlaylistVersion(); return PLAYLIST_RESULT_SUCCESS; |