]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - html/cgi-bin/mpfire.cgi
Add missing patches for compat-wireless.
[people/teissler/ipfire-2.x.git] / html / cgi-bin / mpfire.cgi
index 06134af83d4e5d4c348de7a0aa2702ad704ca1c8..6b06d3b640bd35cd6ac676fa71b1b6db20ce7068 100644 (file)
@@ -80,7 +80,7 @@ if ( $ENV{'QUERY_STRING'} =~ /title/){
        my $song = "";
        if ( $mpd->current() )
        {
-               $song = substr("-= ".$mpd->current()->Artist()." | ".$mpd->current()->Title(),0,90)." =-<br /> ";
+               $song = substr("-= ".$mpd->current()->Artist()." | ".$mpd->current()->Title(),0,85)." =-<br /> ";
                if ( $song eq "-=  |  =-<br /> " ){
                        $song = "None<br />"
                };
@@ -231,8 +231,7 @@ if ( $mpfiresettings{'ACTION'} eq "scan" ){
 }elsif ( $mpfiresettings{'ACTION'} eq "playweb" ){
        $message=system("/usr/local/bin/mpfirectrl","playweb","\"$mpfiresettings{'FILE'}\"","2>/dev/null");
 }elsif ( $mpfiresettings{'ACTION'} eq "playlist" ){
-# on keypress play the playlist
-       $message=system("/usr/local/bin/mpfirectrl playlist 2>/dev/null");
+       $mpd->play();
 }elsif ( $mpfiresettings{'ACTION'} eq "emptyplaylist" ){
 # on keypress clear the playlist
        $mpd->playlist->clear();
@@ -318,7 +317,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);
 
 ############################################################################################################################
@@ -367,7 +366,7 @@ print <<END
 END
 ;
 
-foreach ($mpd->collection->all_artists()){
+foreach (sort($mpd->collection->all_artists())){
        if ( $_ ne '' ){
                print "<option>".encode('utf-8', $_)."</option>\n";
        }
@@ -384,7 +383,7 @@ print <<END
 END
 ;
 
-foreach ($mpd->collection->all_albums()){
+foreach (sort($mpd->collection->all_albums())){
        if ( $_ ne '' ){
                print "<option>".encode('utf-8', $_)."</option>\n";
        }
@@ -403,7 +402,7 @@ print <<END
 END
 ;
 
-foreach ($mpd->collection->all_years()){
+foreach (sort($mpd->collection->all_years())){
        if ( $_ ne '' ){
                print "<option>$_</option>\n";
        }
@@ -420,7 +419,7 @@ print <<END
 END
 ;
 
-foreach ($mpd->collection->all_genre()){
+foreach (sort($mpd->collection->all_genre())){
        if ( $_ ne '' ){
                print "<option>$_</option>\n";
        }
@@ -601,7 +600,7 @@ foreach (@webradio){
        }else{
                print "<tr>";
        }
-       chomp $stream[1];chop $stream[2];
+       chomp $stream[1];chomp $stream[2];
        print <<END
 <td align='left'><a href='$stream[2]' target='_blank'>$stream[1]</a></td>
 <td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='FILE' value='$stream[0]' /><input type='hidden' name='ACTION' value='playweb' /><input type='image' alt='$Lang::tr{'play'}' title='$Lang::tr{'play'}' src='/images/media-playback-start.png' align='middle' /></form></td>