---
src/playlist.c | 26 ++++++++++++++++++--------
1 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/src/playlist.c b/src/playlist.c
index e5aad2e..3108ba9 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -507,22 +507,32 @@ static void queueNextSongInPlaylist(void)
static void syncPlaylistWithQueue(int queue)
{
- if (queue && getPlayerQueueState() == PLAYER_QUEUE_BLANK) {
- queueNextSongInPlaylist();
- } else if (getPlayerQueueState() == PLAYER_QUEUE_DECODE) {
- if (playlist.queued != -1)
- setQueueState(PLAYER_QUEUE_PLAY);
- else
- setQueueState(PLAYER_QUEUE_STOP);
- } else if (getPlayerQueueState() == PLAYER_QUEUE_EMPTY) {
+ switch (getPlayerQueueState()) {
+ case PLAYER_QUEUE_EMPTY:
setQueueState(PLAYER_QUEUE_BLANK);
if (playlist.queued >= 0) {
DEBUG("playlist: now playing queued song\n");
playlist.current = playlist.queued;
}
playlist.queued = -1;
+ /* intentionally no break here */
+
+ case PLAYER_QUEUE_BLANK:
if (queue)
queueNextSongInPlaylist();
+ break;
+
+ case PLAYER_QUEUE_DECODE:
+ if (playlist.queued != -1)
+ setQueueState(PLAYER_QUEUE_PLAY);
+ else
+ setQueueState(PLAYER_QUEUE_STOP);
+ break;
+
+ case PLAYER_QUEUE_FULL:
+ case PLAYER_QUEUE_PLAY:
+ case PLAYER_QUEUE_STOP:
+ break;
}
}
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Musicpd-dev-team mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team