mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
MPFire nochmal konrrigiert
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@876 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
@@ -152,7 +152,7 @@ buffer_before_play "25%"
|
||||
# this value, then mpd will drop root priveleges
|
||||
# and runs as the user specified.
|
||||
#
|
||||
user "nobody"
|
||||
#user "nobody"
|
||||
#
|
||||
# Set this value if you only have one
|
||||
# address you want to allow connection to.
|
||||
|
||||
@@ -7,10 +7,6 @@ require "${General::swroot}/header.pl";
|
||||
my $filename = "";
|
||||
my $debug = 0;
|
||||
|
||||
if ( ! -e /var/run/mpd.pid){
|
||||
system("mpd >/dev/null");
|
||||
}
|
||||
|
||||
if ($ARGV[0] eq 'scan') {
|
||||
if ($debug){print "Creating Database\n";}
|
||||
system("mpd --create-db >/dev/null");
|
||||
@@ -75,9 +71,10 @@ elsif ($ARGV[0] eq 'stats') {
|
||||
}
|
||||
elsif ($ARGV[0] eq 'playweb') {
|
||||
&checkmute();
|
||||
&stop();
|
||||
&clearplaylist();
|
||||
if ($debug){print "Playing webstream $ARGV[1] \n";}
|
||||
system("mpc add http://$ARGV[1] >/dev/null && mpc play >/dev/null && sleep 1");
|
||||
system("mpc add \"http://$ARGV[1]\" >/dev/null && mpc play >/dev/null && sleep 1");
|
||||
}
|
||||
elsif ($ARGV[0] eq 'volume') {
|
||||
$temp = "Master - ";
|
||||
@@ -91,6 +88,10 @@ sub clearplaylist(){
|
||||
system("mpc clear >/dev/null");
|
||||
}
|
||||
|
||||
sub stop(){
|
||||
system("mpc stop >/dev/null");
|
||||
}
|
||||
|
||||
sub checkplaylist(){
|
||||
my $Datei = "/var/ipfire/mpfire/playlist.m3u";
|
||||
my @Info = stat($Datei);
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
etc/rc.d/init.d/mpd
|
||||
usr/bin/mpd
|
||||
var/log/mpd.error.log
|
||||
var/log/mpd.log
|
||||
#usr/share/doc/mpd
|
||||
#usr/share/doc/mpd/COMMANDS
|
||||
#usr/share/doc/mpd/README
|
||||
|
||||
Reference in New Issue
Block a user