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

Diff for /mp3/bin/addmp3playlist.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: addmp3playlist.pl,v 1.2 2006/08/12 00:14:53 andrew Exp $
 ########################################################################  ########################################################################
 # addmp3playlist.pl *** Adds MP3's to the playlist  # addmp3playlist.pl *** Adds MP3's to the playlist
 #  #
Line 14 
Line 14 
 ########################################################################  ########################################################################
 # *** Variables ***  # *** Variables ***
 my $DestDir = '/home/mp3/Sorted';  my $DestDir = '/home/mp3/Sorted';
 my $filename = $ENV{'QUERY_STRING'};  
 my $playlist = '/var/www/mp3/playlist/playlist.lst';  
   
   
   
Line 24 
Line 22 
 ########################################################################  ########################################################################
 if (! -d $DestDir) { mkdir $DestDir, 0777 }  if (! -d $DestDir) { mkdir $DestDir, 0777 }
   
   my ($prefix, $filename, $playlist) = split /\&/, $ENV{'QUERY_STRING'};
   
   if ($filename) {
           $filename =~ s/%(..)/pack("c",hex($1))/ge;
   } else {
           $filename ='';
   }
   if ($playlist) {
           $playlist =~ s/%(..)/pack("c",hex($1))/ge;
   } else {
           $playlist ='playlist.lst';
   }
   
   if ($prefix) {
           $prefix =~ s/%(..)/pack("c",hex($1))/ge;
   } else {
           $prefix ='';
   }
   
   my $playlist = '/var/www/mp3/playlist/' . $prefix . $playlist;
   
 print "Content-Type: text/html\n\n";  print "Content-Type: text/html\n\n";
   
 $filename =~ s/%(..)/pack("c",hex($1))/ge;  
   
 if ($filename) {  if ($filename) {
         print "<html>\n<head>\n\t<meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>";          print "<html>\n<head>\n\t<meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>";

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

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