···984984/*
985985 * Sort the array of indices for the playlist. If start_current is true then
986986 * set the index to the new index of the current song.
987987+ * Also while going to unshuffled mode set the first_index to 0.
987988 */
988989static int sort_playlist(struct playlist_info* playlist, bool start_current,
989990 bool write)
···10121013 playlist->shuffle_modified = false;
10131014 if (write && playlist->control_fd >= 0)
10141015 {
10161016+ playlist->first_index = 0;
10151017 update_control(playlist, PLAYLIST_COMMAND_UNSHUFFLE,
10161018 playlist->first_index, -1, NULL, NULL, NULL);
10171019 }