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

Diff for /mp3/bin/removemp3playlist.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: removemp3playlist.pl,v 1.2 2006/08/12 00:14:53 andrew Exp $
 ########################################################################  ########################################################################
 # RemoveMP3Playlist.pl *** Removed MP3's from the playlist  # RemoveMP3Playlist.pl *** Removed MP3's from the playlist
 #  #
Line 13 
Line 13 
 #my qw/ $removed $filename $list /;  #my qw/ $removed $filename $list /;
 ########################################################################  ########################################################################
 # *** Variables ***  # *** Variables ***
 my $filename = $ENV{'QUERY_STRING'};  
 my $list = '/var/www/mp3/playlist/playlist.lst';  
   
   
   
 ########################################################################  ########################################################################
 # *** MAIN ***  # *** MAIN ***
 ########################################################################  ########################################################################
   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 $list = '/var/www/mp3/playlist/' . $prefix . $playlist;
   
 my @playlist = get_playlist($list);  my @playlist = get_playlist($list);
 $filename =~ s/%(..)/pack("c",hex($1))/ge;  $filename =~ s/%(..)/pack("c",hex($1))/ge;
 my $removed = 0;  my $removed = 0;
 my $oldfilename;  my $oldfilename;
   
 print "Content-Type: text/html\n\n";  print "Content-Type: text/html\n\n";
 print "<html>\n<head>\n\t<meta HTTP-EQUIV='Pragma' CONTENT='no-cache'> <title>Added $filename</title>\n<body>\n\n";  print "<html>\n<head>\n\t<meta HTTP-EQUIV='Pragma' CONTENT='no-cache'> <title>Removed $filename</title>\n<body>\n\n";
   
 # Print_Nav();  # Print_Nav();
 my $i;  my $i;

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

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