[BACK]Return to addsearch.pl CVS log [TXT][DIR] Up to [local] / mp3 / bin

Diff for /mp3/bin/addsearch.pl between version 1.2 and 1.3

version 1.2, 2006/08/12 01:14:53 version 1.3, 2007/02/08 20:04:03
Line 1 
Line 1 
 #!/usr/bin/perl -w  #!/usr/bin/perl -w
 # $RedRiver$  # $RedRiver: addsearch.pl,v 1.2 2006/08/12 00:14:53 andrew Exp $
 ########################################################################  ########################################################################
 # Search.pl *** Searches the full list of songs and finds matches.  # Search.pl *** Searches the full list of songs and finds matches.
 #  #
Line 12 
Line 12 
 #use MP3::Info;  #use MP3::Info;
 #my qw/ @playlist $maplay $filename $basedir $htmldir /;  #my qw/ @playlist $maplay $filename $basedir $htmldir /;
   
 my $listfile = 'fulllist.lst';  
   
 my $list = '/var/www/mp3/playlist/' . $listfile;  
   
 my $playlist = '/var/www/mp3/playlist/playlist.lst';  
   
 my $exe = 'addmp3playlist.pl';  my $exe = 'addmp3playlist.pl';
 my $Search = 'search.pl';  my $Search = 'search.pl';
   
Line 25 
Line 20 
 # *** MAIN ***  # *** MAIN ***
 #######################################################################  #######################################################################
   
   my $prefix = $ENV{'QUERY_STRING'};
   if ($prefix) {
           $prefix =~ s/%(..)/pack("c",hex($1))/ge;
   } else {
           $prefix ='';
   }
   
   my $listfile = $prefix . 'fulllist.lst';
   my $list = '/var/www/mp3/playlist/' . $listfile;
   my $playlist = '/var/www/mp3/playlist/' . $prefix . 'playlist.lst';
   
 print "Content-Type: text/html\n\n";  print "Content-Type: text/html\n\n";
 print "\n\n<html>\n<head>\n\t<meta HTTP-EQUIV='Pragma' CONTENT='no-cache'> <title>MP3 Search</title>\n";  print "\n\n<html>\n<head>\n\t<meta HTTP-EQUIV='Pragma' CONTENT='no-cache'> <title>MP3 Search</title>\n";
 #print "<meta HTTP-EQUIV=\"REFRESH\" CONTENT=\"300\">\n";  #print "<meta HTTP-EQUIV=\"REFRESH\" CONTENT=\"300\">\n";
Line 86 
Line 91 
   
                 print "<br>\n";                  print "<br>\n";
                 foreach my $filename (@playlist) {                  foreach my $filename (@playlist) {
                         #print "\t<li><a href=\"$exe\?" . EncodeURL($filename) . "\" target=\"bottom\">$filename</a></li>\n";                          #print "\t<li><a href=\"$exe\?" . EncodeURL($prefix) . '&' . EncodeURL($filename) . "\" target=\"bottom\">$filename</a></li>\n";
                         AddSong($filename);                          AddSong($filename);
                         $counter++;                          $counter++;
                 }                  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>