summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4061c03)
audio_output {
type "alsa"
name "alsa"
audio_output {
type "alsa"
name "alsa"
- device "hw:0,0" # optional
- format "44100:16:2" # optional
+# device "hw:0,0" # optional
+# format "44100:16:2" # optional
}
#
# An example of an OSS output:
#
}
#
# An example of an OSS output:
#
-audio_output {
- type "oss"
- name "My OSS Device"
- device "/dev/dsp" # optional
- format "44100:16:2" # optional
-}
+#audio_output {
+# type "oss"
+# name "My OSS Device"
+# device "/dev/dsp" # optional
+# format "44100:16:2" # optional
+#}
#
# An example of a shout output (for streaming to Icecast):
#
#
# An example of a shout output (for streaming to Icecast):
#
-audio_output {
- type "shout"
- name "My Shout Stream"
- host "localhost"
- port "8000"
- mount "/mpd.ogg"
- password "hackme"
+#audio_output {
+# type "shout"
+# name "My Shout Stream"
+# host "localhost"
+# port "8000"
+# mount "/mpd.ogg"
+# password "hackme"
- bitrate "128"
- format "44100:16:1"
+# bitrate "128"
+# format "44100:16:1"
# user "source" # optional
# description "My Stream Description" # optional
# genre "jazz" # optional
# public "no" # optional
# user "source" # optional
# description "My Stream Description" # optional
# genre "jazz" # optional
# public "no" # optional
#
# Set this if you have problems
# playing audio files.
#
# Set this if you have problems
# playing audio files.
if ($ARGV[0] eq 'scan') {
if ($debug){print "Creating Database\n";}
system("mpd --create-db >/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");
}
elsif ($ARGV[0] eq 'play') {
&checkmute();
}
elsif ($ARGV[0] eq 'play') {
&checkmute();
}
elsif ($ARGV[0] eq 'playlist') {
&checkmute();
}
elsif ($ARGV[0] eq 'playlist') {
&checkmute();
&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");
&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");
system("/usr/bin/amixer set Master $ARGV[1]%- 2>/dev/null >/dev/null");
system("/usr/bin/amixer set PCM $ARGV[1]%- 2>/dev/null >/dev/null");
}
system("/usr/bin/amixer set Master $ARGV[1]%- 2>/dev/null >/dev/null");
system("/usr/bin/amixer set PCM $ARGV[1]%- 2>/dev/null >/dev/null");
}
-elsif ($ARGV[0] eq 'playall') {
- if ($debug){print "Playing everything\n";}
- system("mpc play >/dev/null");
- }
elsif ($ARGV[0] eq 'toggle') {
system("mpc toggle >/dev/null");
}
elsif ($ARGV[0] eq 'toggle') {
system("mpc toggle >/dev/null");
}
}
elsif ($ARGV[0] eq 'playweb') {
&checkmute();
}
elsif ($ARGV[0] eq 'playweb') {
&checkmute();
&clearplaylist();
if ($debug){print "Playing webstream $ARGV[1] \n";}
&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 - ";
}
elsif ($ARGV[0] eq 'volume') {
$temp = "Master - ";
system("mpc clear >/dev/null");
}
system("mpc clear >/dev/null");
}
-sub stop(){
- system("mpc stop >/dev/null");
+sub shuffle(){
+ system("mpc shuffle >/dev/null");
elsif ( $mpfiresettings{'ACTION'} eq "playlist" ){$message=system("/usr/local/bin/mpfirectrl playlist");}
elsif ( $mpfiresettings{'ACTION'} eq "emptyplaylist" ){$message=system("/usr/local/bin/mpfirectrl clearplaylist");}
elsif ( $mpfiresettings{'ACTION'} eq "addtoplaylist" ){$message=system("/usr/local/bin/mpfirectrl","playadd","\"$mpfiresettings{'FILE'}\"");}
elsif ( $mpfiresettings{'ACTION'} eq "playlist" ){$message=system("/usr/local/bin/mpfirectrl playlist");}
elsif ( $mpfiresettings{'ACTION'} eq "emptyplaylist" ){$message=system("/usr/local/bin/mpfirectrl clearplaylist");}
elsif ( $mpfiresettings{'ACTION'} eq "addtoplaylist" ){$message=system("/usr/local/bin/mpfirectrl","playadd","\"$mpfiresettings{'FILE'}\"");}
-elsif ( $mpfiresettings{'ACTION'} eq "playall" ){$message=system("/usr/local/bin/mpfirectrl playall");}
+elsif ( $mpfiresettings{'ACTION'} eq "playall" ){
+my @temp = ""; my @song = "";
+
+foreach (keys(%songs)){
+ @song = split(/\|/,$songs{$_});push(@temp,$song[0])
+ }
+open(DATEI, ">${General::swroot}/mpfire/playlist.m3u") || die "Could not add playlist";
+print DATEI @temp;
+close(DATEI);
+
+$message=system("/usr/local/bin/mpfirectrl playlist");
+}
elsif ( $mpfiresettings{'ACTION'} eq "playalbum" )
{
my @temp = ""; my @song = ""; my @select = split(/\|/,$mpfiresettings{'album'});
elsif ( $mpfiresettings{'ACTION'} eq "playalbum" )
{
my @temp = ""; my @song = ""; my @select = split(/\|/,$mpfiresettings{'album'});