MPFire Streaming beigebracht, zumindest m3u Files

VPN-Watch nochmal angepasst
DHCP Start Delay kleiner gesetzt
UpdateBooster um ein paar Icons bereichert
Favicon transparent gemacht, der FF will dennoch nicht damit


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@658 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
maniacikarus
2007-07-03 19:59:13 +00:00
parent 186e3d2cf8
commit a2d5130fb5
12 changed files with 97 additions and 21 deletions

View File

@@ -9,7 +9,7 @@ require "${General::swroot}/header.pl";
my $filename = "";
my %songs = "";
my $debug = 0;
my $debug = 1;
if ($ARGV[0] eq 'scan') {
my $command = "find ";
@@ -43,8 +43,11 @@ if ($ARGV[0] eq 'play') {
if ($ARGV[0] eq 'stop') {
my $PID = `ps -ef | grep mpg123 | grep playlist | head -1 | awk '{ print \$2 }'`;
if ($debug){print "Stopping $PID\n";}
system("kill -KILL $PID");
if ( $PID ne "" ){
if ($debug){print "Stopping $PID\n";}
system("kill -KILL $PID");
}
else {&stopweb();}
}
if ($ARGV[0] eq 'volup') {
@@ -80,6 +83,39 @@ if ($ARGV[0] eq 'next') {
system("kill -SIGINT $PID");
}
if ($ARGV[0] eq 'song') {
my $song = `lsof -nX \| grep mpg123 \| grep REG \| grep mem | grep mp3`;
my @song = split(/\//,$song);
my $i = @song;
print $song[$i-1];
}
if ($ARGV[0] eq 'playweb') {
&General::readhash("${General::swroot}/proxy/settings", \%proxysettings);
if ($debug){print "Playing webstream\n";}
if ($proxysettings{'UPSTREAM_PROXY'}) {
if ($proxysettings{'UPSTREAM_USER'}) {
system("wget -qO - `wget -qO - $ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - -p $proxysettings{'UPSTREAM_USER'}:$proxysettings{'UPSTREAM_PASSWORD'}@$proxysettings{'UPSTREAM_PROXY'} 2>/dev/null >/dev/null &");
}
else { system("wget -qO - `wget -qO - $ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - -p $proxysettings{'UPSTREAM_PROXY'} 2>/dev/null >/dev/null &");}
} else {
system("wget -qO - `wget -qO - $ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - 2>/dev/null >/dev/null &");
}
}
if ($ARGV[0] eq 'stopweb') {
&stopweb();
}
sub stopweb(){
my $PID = `ps -ef | grep wget | grep EXTM3U | head -1 | awk '{ print \$2 }'`;
if ($debug){print "Stopping $PID\n";}
system("kill -KILL $PID");
my $PID = `ps -ef | grep "mpg123 -b 1024 --aggressive -Zq -" | head -1 | awk '{ print \$2 }'`;
if ($debug){print "Killing Process $PID\n";}
system("kill -KILL $PID");
}
sub getSongInfo(){
my $mp3 = MP3::Tag->new($filename);
my ($title, $track, $artist, $album, $comment, $year, $genre) = $mp3->autoinfo();