playlist: removed unreachable "playing" check

In playPlaylist(), the second "song==-1 && playing" check can never be
reached, because at this point, the function has already returned
(after unpausing).
This commit is contained in:
Max Kellermann 2009-01-23 06:28:46 +01:00
parent e5c323fd57
commit 5d31e7e7d2

View File

@ -703,19 +703,15 @@ enum playlist_result playPlaylist(int song)
return PLAYLIST_RESULT_BAD_RANGE; return PLAYLIST_RESULT_BAD_RANGE;
if (playlist.queue.random) { if (playlist.queue.random) {
if (song == -1 && playlist.playing) { if (song >= 0)
queue_shuffle_order(&playlist.queue); i = queue_position_to_order(&playlist.queue, song);
} else {
if (song >= 0)
i = queue_position_to_order(&playlist.queue, song);
if (!playlist.playing) if (!playlist.playing)
playlist.current = 0; playlist.current = 0;
queue_swap_order(&playlist.queue, queue_swap_order(&playlist.queue,
i, playlist.current); i, playlist.current);
i = playlist.current; i = playlist.current;
}
} }
playlist_stopOnError = false; playlist_stopOnError = false;