]> git.etc.gen.nz Git - mpd-tools.git/commitdiff
Remove need for mpc-addall command. master
authorAndrew Ruthven <andrew@etc.gen.nz>
Thu, 26 Jun 2008 23:20:52 +0000 (11:20 +1200)
committerAndrew Ruthven <andrew@cerberus.etc.gen.nz>
Thu, 26 Jun 2008 23:20:52 +0000 (11:20 +1200)
mpc-rotate

index efd7b5b32b412b99633bd5ceac7369a4b3bce80d..d030adede2a263f638ec9675beed2e97352bd604 100755 (executable)
@@ -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