===================================================================
RCS file: /cvs/mp3/bin/createfulllist.pl,v
retrieving revision 1.2
retrieving revision 1.4
diff -u -r1.2 -r1.4
--- mp3/bin/createfulllist.pl 2006/08/12 01:14:53 1.2
+++ mp3/bin/createfulllist.pl 2010/03/26 14:21:55 1.4
@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
-# $RedRiver$
+# $RedRiver: createfulllist.pl,v 1.3 2007/02/08 20:04:03 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,24 @@
# *** MAIN ***
#######################################################################
-if ($subdir) {
- $subdir =~ s/%(..)/pack("c",hex($1))/ge;
+my $query_string = $ENV{'QUERY_STRING'} || q{};
+my ($prefix, $subdir) = split /\&/, $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 +66,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 +78,7 @@ # my $count; # foreach my $mp3dir (sort keys %mp3s) { # foreach $mp3 (@{ $mp3s{$mp3dir} }) { -# print "\t