===================================================================
RCS file: /cvs/mp3/bin/createfulllist.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mp3/bin/createfulllist.pl 2006/08/12 01:14:53 1.2
+++ mp3/bin/createfulllist.pl 2007/02/08 20:04:03 1.3
@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
-# $RedRiver$
+# $RedRiver: createfulllist.pl,v 1.2 2006/08/12 00:14:53 andrew Exp $
########################################################################
# showall.pl *** Displays all MP3's in all subdirs
#
@@ -13,10 +13,6 @@
#my qw/ $basedir %mp3s %dirs $countdir $countmp3 $fulllist /;
my $basedir = '/home/mp3/Sorted';
-my $subdir = $ENV{'QUERY_STRING'};
-my $playlist = '/var/www/mp3/playlist/playlist.lst';
-my $fulllist = '/var/www/mp3/playlist/fulllist.lst';
-my $newlist = '/var/www/mp3/playlist/newlist.lst';
my $countdir = 0;
my $countmp3 = 0;
@@ -24,12 +20,23 @@
# *** MAIN ***
#######################################################################
-if ($subdir) {
- $subdir =~ s/%(..)/pack("c",hex($1))/ge;
+my ($prefix, $subdir) = split /\&/, $ENV{'QUERY_STRING'};
+if ($subdir) {
+ $subdir =~ s/%(..)/pack("c",hex($1))/ge;
} else {
- $subdir ='';
+ $subdir ='';
}
+if ($prefix) {
+ $prefix =~ s/%(..)/pack("c",hex($1))/ge;
+} else {
+ $prefix ='';
+}
+
+my $playlist = '/var/www/mp3/playlist/' . $prefix . 'playlist.lst';
+my $fulllist = '/var/www/mp3/playlist/' . $prefix . 'fulllist.lst';
+my $newlist = '/var/www/mp3/playlist/' . $prefix . 'newlist.lst';
+
#$basedir = $basedir . "/" . $subdir;
print "Content-Type: text/html\n\n";
@@ -58,7 +65,7 @@
# my $count;
# my @sorted = sort { lc($dirs{$a}) cmp lc($dirs{$b}) } (keys %dirs);
# foreach my $dir (@sorted) {
-# print "$dirs{$dir}
";
+# print "$dirs{$dir}
";
# $count++;
# }
# print "Total dirs displayed: $count
\n"; @@ -70,7 +77,7 @@ # my $count; # foreach my $mp3dir (sort keys %mp3s) { # foreach $mp3 (@{ $mp3s{$mp3dir} }) { -# print "\t