]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - config/mpfire/mpfire.pl
Start Core Update 125
[ipfire-2.x.git] / config / mpfire / mpfire.pl
index 970b76bb34be97dfa5a513b518effe8abc846287..66413145de61a1545bd4ac992a3801d6f7168f39 100644 (file)
@@ -14,7 +14,7 @@ system("/etc/init.d/mpd start >/dev/null");
 if ($ARGV[0] eq 'scan') {
   if ($debug){print "Creating Database\n";}
   system("mpd --create-db >/dev/null");
-  system("/etc/init.d/mpd restart");
+  system("/etc/init.d/mpd restart >/dev/null");
 }
 elsif ($ARGV[0] eq 'play') {
   &checkmute();
@@ -26,13 +26,6 @@ elsif ($ARGV[0] eq 'playadd') {
   if ($debug){print "Yes we are called and we will add $ARGV[1]\n";}
   system("mpc add \"$ARGV[1]\" >/dev/null && mpc play >/dev/null");
   }
-elsif ($ARGV[0] eq 'playlist') {
-  &checkmute();
-  &shuffle();
-  &clearplaylist();
-  if ($debug){print "Yes we are called and we will play your Playlist\n";}
-  system("mpc load playlist >/dev/null && mpc play >/dev/null");
-  }
 elsif ($ARGV[0] eq 'clearplaylist') {
   if ($debug){print "Deleting playlist\n";}
   &clearplaylist();
@@ -90,7 +83,7 @@ sub clearplaylist(){
   }
 
 sub shuffle(){
-  system("mpc shuffle >/dev/null");  
+  system("mpc random >/dev/null");  
   }
 
 sub checkplaylist(){
@@ -106,10 +99,10 @@ sub checkmute(){
   my @PCM = split(/ /,$temp);
  if ( $PCM[7] =~  /off/ ){
   if ($debug){print "PCM was muted - umuting.\n";}
-  system("amixer set PCM toggle");
+  system("amixer set PCM toggle >/dev/null");
   }
  if ( $Master[7] =~ /off/ ){
   if ($debug){print "Master was muted - umuting.\n";}
-  system("amixer set Master toggle");
+  system("amixer set Master toggle >/dev/null");
   } 
 }