diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-06-08 20:16:28 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-06-08 20:16:28 +0000 |
commit | adc11cb8aaae08debe5939596f8430a511dbcd34 (patch) | |
tree | 4d9ea4c500ab982a5767a14addf1ae940b70189b /src/playlist.c | |
parent | 4959c30678f374f265d364daa9580e2b89fd17ff (diff) | |
download | mpd-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.c | 5 |
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(); } |