From: Andrew Ruthven <andrew@etc.gen.nz>
Date: Thu, 26 Jun 2008 23:20:52 +0000 (+1200)
Subject: Remove need for mpc-addall command.
X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;p=mpd-tools.git

Remove need for mpc-addall command.
---

diff --git a/mpc-rotate b/mpc-rotate
index efd7b5b..d030ade 100755
--- a/mpc-rotate
+++ b/mpc-rotate
@@ -8,10 +8,6 @@ then
   . $state
 fi
 
-play_general() {
-  mpc-addall > /dev/null
-}
-
 save_state() {
   echo "State: $1"
   echo "PLAYLIST=$1" > $state
@@ -48,16 +44,17 @@ else
 
       play /home/sounds/prompts/$next_list.wav
 
+      mpc_cmd clear
+
       if [ $next_list == 'general' ]
       then
-        play_general
+	mpc listall | grep -v -f /home/sounds/etc/exclude_songs | mpc add > /dev/null
       else
-        mpc_cmd clear
         mpc_cmd load $next_list
-        mpc_cmd shuffle
-        mpc_cmd play
       fi
 
+      mpc_cmd shuffle
+      mpc_cmd play
       save_state $next_list;
 
       exit