]> git.etc.gen.nz Git - mpd-tools.git/commitdiff
Abstract out the mpc command - it turns out that --no-status isn't in the Etch version.
authorAndrew Ruthven <andrew@etc.gen.nz>
Thu, 26 Jun 2008 23:19:40 +0000 (11:19 +1200)
committerAndrew Ruthven <andrew@cerberus.etc.gen.nz>
Thu, 26 Jun 2008 23:19:40 +0000 (11:19 +1200)
mpc-rotate

index 7da0556dd5de9d1690972742ba5a809d1139d37a..efd7b5b32b412b99633bd5ceac7369a4b3bce80d 100755 (executable)
@@ -17,9 +17,13 @@ save_state() {
   echo "PLAYLIST=$1" > $state
 }
 
+mpc_cmd() {
+  mpc $* > /dev/null
+}
+
 #PLAYLIST=children
 
-mpc --no-status stop
+mpc_cmd stop
 
 if [ "x$PLAYLIST" == "x" ]
 then
@@ -48,10 +52,10 @@ else
       then
         play_general
       else
-        mpc --no-status clear
-        mpc --no-status load $next_list
-        mpc --no-status shuffle
-        mpc --no-status play
+        mpc_cmd clear
+        mpc_cmd load $next_list
+        mpc_cmd shuffle
+        mpc_cmd play
       fi
 
       save_state $next_list;