Code

po: update Galician translation
[ncmpc.git] / src / screen_queue.c
index fbcc18039a98d593e8cf6d153fb00c47f4c6a263..67df4b53655b7f3603cf174ae48c1a88c724b266 100644 (file)
@@ -1,5 +1,5 @@
 /* ncmpc (Ncurses MPD Client)
- * (c) 2004-2009 The Music Player Daemon Project
+ * (c) 2004-2010 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
  *
  * This program is free software; you can redistribute it and/or modify
@@ -550,6 +550,10 @@ screen_queue_update(struct mpdclient *c)
 {
        if (c->events & MPD_IDLE_QUEUE)
                screen_queue_restore_selection();
+       else
+               /* the queue size may have changed, even if we havn't
+                  revceived the QUEUE idle event yet */
+               list_window_set_length(lw, playlist_length(playlist));
 
        if (((c->events & MPD_IDLE_PLAYER) != 0 &&
             screen_queue_song_change(c->status)) ||
@@ -734,7 +738,7 @@ screen_queue_cmd(struct mpdclient *c, command_t cmd)
 
        case CMD_SHUFFLE:
                list_window_get_range(lw, &range);
-               if (range.end < range.start + 1)
+               if (range.end <= range.start + 1)
                        /* No range selection, shuffle all list. */
                        break;