X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Fmpfire.cgi;h=6cec8ff338c06e8458e77796e3d24e08ff53e10c;hp=8adbb99b9c254d6a2af93f25dd652122aa4c3413;hb=3e1c7cfc7de8ec2245f63bfa5eb63c59c8081e6a;hpb=e44d32bf2c17d30b3819332e8e688260a9848c46 diff --git a/html/cgi-bin/mpfire.cgi b/html/cgi-bin/mpfire.cgi index 8adbb99b9c..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,7 +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{'PAGE'}; delete $mpfiresettings{'FRAME'}; &General::writehash("${General::swroot}/mpfire/settings", \%mpfiresettings); open(DATEI, "<${General::swroot}/mpfire/mpd.conf") || die "Datei nicht gefunden"; @@ -355,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 ""; @@ -377,6 +401,7 @@ print <
+
@@ -413,6 +439,7 @@ print <
+
@@ -394,6 +419,7 @@ print <
+
$Lang::tr{'year'}$Lang::tr{'genre'}
@@ -430,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 ; @@ -480,7 +512,7 @@ if ( $#songs > 100 ){ print"
"; } } - + print ""; print ""; } print < + @@ -526,6 +559,7 @@ if ( $mpfiresettings{'PAGE'} eq 'all' ){ + @@ -542,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"; @@ -604,7 +606,9 @@ foreach (@webradio){ chomp $stream[1];chomp $stream[2]; print <$stream[1] -
+
+ +
END ; @@ -619,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();