aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-06-08 20:16:28 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-06-08 20:16:28 +0000
commitadc11cb8aaae08debe5939596f8430a511dbcd34 (patch)
tree4d9ea4c500ab982a5767a14addf1ae940b70189b /src/playlist.c
parent4959c30678f374f265d364daa9580e2b89fd17ff (diff)
downloadmpd-adc11cb8aaae08debe5939596f8430a511dbcd34.tar.gz
mpd-adc11cb8aaae08debe5939596f8430a511dbcd34.tar.xz
mpd-adc11cb8aaae08debe5939596f8430a511dbcd34.zip
on random select, move current to the first song played
git-svn-id: https://svn.musicpd.org/mpd/trunk@1401 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/playlist.c')
-rw-r--r--src/playlist.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/playlist.c b/src/playlist.c
index 911291ff7..75943f33d 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -1046,6 +1046,11 @@ int setPlaylistRandomStatus(FILE * fp, int status) {
playlist.length-1);
}
else */randomizeOrder(0,playlist.length-1);
+ if(playlist.current >= 0 &&
+ playlist.current < playlist.length)
+ {
+ swapOrder(playlist.current, 0);
+ }
}
else orderPlaylist();
}