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
This commit is contained in:
Warren Dukes 2004-06-08 20:16:28 +00:00
parent 4959c30678
commit adc11cb8aa

View File

@ -1046,6 +1046,11 @@ int setPlaylistRandomStatus(FILE * fp, int status) {
playlist.length-1); playlist.length-1);
} }
else */randomizeOrder(0,playlist.length-1); else */randomizeOrder(0,playlist.length-1);
if(playlist.current >= 0 &&
playlist.current < playlist.length)
{
swapOrder(playlist.current, 0);
}
} }
else orderPlaylist(); else orderPlaylist();
} }