X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=html%2Fcgi-bin%2Fmpfire.cgi;h=6cec8ff338c06e8458e77796e3d24e08ff53e10c;hb=324cae81712b7b1b7b80333ad92e369cac28b6ce;hp=ae86226747051f6087dac044c8f2813ebeb92010;hpb=96481f95195e95445e1795197cba80bd6bfc1820;p=people%2Fpmueller%2Fipfire-2.x.git diff --git a/html/cgi-bin/mpfire.cgi b/html/cgi-bin/mpfire.cgi index ae86226747..6cec8ff338 100644 --- a/html/cgi-bin/mpfire.cgi +++ b/html/cgi-bin/mpfire.cgi @@ -195,7 +195,8 @@ if ($work ne ""){ exit; } -if ( $mpfiresettings{'PAGE'} eq "" ){$mpfiresettings{'PAGE'} = "1";} +if ( $mpfiresettings{'PAGE'} eq "" ){ $mpfiresettings{'PAGE'} = "1";}; +if ( $mpfiresettings{'FRAME'} eq "" ){$mpfiresettings{'FRAME'} = "webradio";}; &Header::getcgihash(\%mpfiresettings); &Header::openpage($Lang::tr{'mpfire'}, 1,); @@ -210,6 +211,7 @@ if ( $mpfiresettings{'ACTION'} eq "scan" ){ &General::readhash("${General::swroot}/mpfire/settings", \%mpfiresettings); &Header::getcgihash(\%mpfiresettings); delete $mpfiresettings{'__CGI__'};delete $mpfiresettings{'x'};delete $mpfiresettings{'y'}; + delete $mpfiresettings{'PAGE'}; delete $mpfiresettings{'FRAME'}; &General::writehash("${General::swroot}/mpfire/settings", \%mpfiresettings); open(DATEI, "<${General::swroot}/mpfire/mpd.conf") || die "Datei nicht gefunden"; @@ -317,7 +319,7 @@ if ( $mpfiresettings{'ACTION'} eq "scan" ){ ############################################################################################################################ ################################### Aufbau der HTML Seite fr globale Sambaeinstellungen #################################### -$mpfiresettings{'MUSICDIR'} = "/"; +$mpfiresettings{'MUSICDIR'} = "/var/mp3"; &General::readhash("${General::swroot}/mpfire/settings", \%mpfiresettings); ############################################################################################################################ @@ -354,6 +356,29 @@ print "Songs:".$mpd->stats()->songs()."
"; &Header::closebox(); +&Header::openbox('100%', 'center', ''); +print < +
+END +; +my @buttons=("webradio", "quick playlist","songs"); +foreach (@buttons){ + if ( $mpfiresettings{'FRAME'} eq $_ ) { + print ""; + } else { + print ""; + } +} + +print < +END +; +&Header::closebox(); + +if ( $mpfiresettings{'FRAME'} eq "quick playlist" ) +{ &Header::openbox('100%', 'center', $Lang::tr{'quick playlist'}); # box to quickly select artist, album, year or genre and play the selection print ""; @@ -376,6 +401,7 @@ print <
+
@@ -412,6 +439,7 @@ print <
+
@@ -393,6 +419,7 @@ print <
+
$Lang::tr{'year'}$Lang::tr{'genre'}
@@ -429,13 +457,17 @@ print <
+
END ; &Header::closebox(); +} +if ( $mpfiresettings{'FRAME'} eq "songs" ) +{ &Header::openbox('100%', 'center', $Lang::tr{'mpfire search'}); # box to quickly search artist, album or title print < + END ; @@ -479,7 +512,7 @@ if ( $#songs > 100 ){ print"
"; } } - + print ""; print ""; } print < + @@ -525,6 +559,7 @@ if ( $mpfiresettings{'PAGE'} eq 'all' ){ + @@ -541,42 +576,10 @@ END print ""; &Header::closebox(); - -&Header::openbox('100%', 'center', $Lang::tr{'mpfire playlist'}); -# box to show the current playlist given from mpc system command -my @playlist = `mpc playlist 2>/dev/null`; - -print < -$Lang::tr{'current playlist'} - - -
- - -
- - -
- - -
- - -END -; - -&Header::closebox(); - +if ( $mpfiresettings{'FRAME'} eq "webradio" ) +{ &Header::openbox('100%', 'center', $Lang::tr{'mpfire webradio'}); # box to select some webradio´s to be played by one click open(DATEI, "<${General::swroot}/mpfire/webradio") || die "Could not open playlist"; @@ -603,7 +606,9 @@ foreach (@webradio){ chomp $stream[1];chomp $stream[2]; print <$stream[1] -
+
+ +
END ; @@ -618,11 +623,51 @@ if ($lines % 2){ print <

http:// -
+ + + END ; print ""; +&Header::closebox(); +} + +&Header::openbox('100%', 'center', $Lang::tr{'mpfire playlist'}); +# box to show the current playlist given from mpc system command +my @playlist = `mpc playlist 2>/dev/null`; + +print < +$Lang::tr{'current playlist'} + + +
+ + + +
+ + +
+ + + +
+ + +END +; + &Header::closebox(); &Header::closebigbox(); &Header::closepage();