diff --git a/config/mpfire/mpfire.pl b/config/mpfire/mpfire.pl index 921733ce8..876fed437 100644 --- a/config/mpfire/mpfire.pl +++ b/config/mpfire/mpfire.pl @@ -41,7 +41,7 @@ elsif ($ARGV[0] eq 'play') { system("/usr/bin/mpg123 -b 1024 --aggressive -q \"$ARGV[1]\" 2>/dev/null >/dev/null &"); } elsif ($ARGV[0] eq 'stop') { - my $PID = `ps -ef \| grep wget \| grep EXTM3U \| head -1 \| grep -v "sh -c" \| awk '{ print \$2 }'`; + my $PID = `ps -ef \| grep "wget -qO" \| head -1 \| grep -v "sh -c" \| awk '{ print \$2 }'`; if ( $PID ne '' ){ if ($debug){print "Stopping $PID\n";} system("kill -KILL $PID"); @@ -69,12 +69,12 @@ elsif ($ARGV[0] eq 'playall') { system("/usr/bin/mpg123 -b 1024 --aggressive -Zq@ /var/ipfire/mpfire/playlist 2>/dev/null >/dev/null &"); } elsif ($ARGV[0] eq 'pause') { - my $PID = `ps -ef \| grep mpg123 \| grep playlist \| head -1 \| grep -v "sh -c" \| awk '{ print \$2 }'`; + my $PID = `ps -ef \| grep mpg123 \| grep playlist \| head -1 \| grep -v "sh -c" \| grep -v "grep" \| awk '{ print \$2 }'`; if ($debug){print "Pausing Process $PID\n";} system("kill -STOP $PID"); } elsif ($ARGV[0] eq 'resume') { - my $PID = `ps -ef \| grep mpg123 \| grep playlist \| head -1 \| grep -v "sh -c" \| awk '{ print \$2 }'`; + my $PID = `ps -ef \| grep mpg123 \| grep playlist \| head -1 \| grep -v "sh -c" \| grep -v "grep" \| awk '{ print \$2 }'`; if ($debug){print "Resuming Process $PID\n";} system("kill -CONT $PID"); } @@ -84,13 +84,15 @@ elsif ($ARGV[0] eq 'next') { system("kill -SIGINT $PID"); } elsif ($ARGV[0] eq 'song') { - my $song = `lsof -nX \| grep mpg123 \| grep REG \| grep mem | grep mp3 \| grep -v "sh -c"`; + my $song = `lsof -nX \| grep mpg123 \| grep REG \| grep mem | grep mp3 \| grep -v "sh -c" \| grep -v "grep"`; my @song = split(/\//,$song); my $i = @song; if ( $i == 0 ){ - my $song = `ps -ef \| grep wget \| grep EXTM3U \| grep -v "sh -c"`; - my @song = split(/,/,$song); - print $song[1]; + my $song = `ps -ef \| grep "wget -qO" \| grep -v "sh -c" \| grep -v "grep"`; + my @song = split(/http\:\/\//,$song); + my $temp = $song[1]; + my @song = split(/ /,$temp); + print $song[0]; } else { print $song[$i-1];} } diff --git a/html/cgi-bin/mpfire.cgi b/html/cgi-bin/mpfire.cgi index 4907b5092..a3d81c108 100644 --- a/html/cgi-bin/mpfire.cgi +++ b/html/cgi-bin/mpfire.cgi @@ -153,7 +153,12 @@ print < -= $song =- -
total $#songdb songs

+END +; +if ( $#songdb > -1 ){ +print"
total $#songdb songs

"; +} +print <
@@ -176,7 +181,7 @@ END ; &Header::closebox(); -if ( $#songdb ne '0' ){ +if ( $#songdb > -1 ){ &Header::openbox('100%', 'center', $Lang::tr{'quick playlist'}); my @artist; diff --git a/src/misc-progs/backupctrl.c b/src/misc-progs/backupctrl.c index b4ce67cb7..62229d6e2 100644 --- a/src/misc-progs/backupctrl.c +++ b/src/misc-progs/backupctrl.c @@ -37,11 +37,9 @@ int main(int argc, char *argv[]) { exit (1); } else{ - fprintf (stderr, "Wrong or no Argument!\n"); - exit (1); + sprintf(add, " %s", argv[i]); + strcat(command, add); } - sprintf(add, " %s", argv[i]); - strcat(command, add); } return safe_system(command); } diff --git a/src/paks/mpfire/install.sh b/src/paks/mpfire/install.sh index a47a7831d..3fd647c36 100644 --- a/src/paks/mpfire/install.sh +++ b/src/paks/mpfire/install.sh @@ -2,3 +2,4 @@ . /opt/pakfire/lib/functions.sh extract_files +chmod nobody.nobody /var/ipfire/mpfire