summaryrefslogtreecommitdiffstats
path: root/tools/songdb.pl
diff options
context:
space:
mode:
authorJonas Häggqvist <rasher@rasher.dk>2005-04-13 00:40:55 +0000
committerJonas Häggqvist <rasher@rasher.dk>2005-04-13 00:40:55 +0000
commita32a74e5910e979714b5e3384be369cc722ae03d (patch)
tree3f2f8d37a075a53591a6142f1da3f5aed9e8d7b0 /tools/songdb.pl
parentac69e2aa82eaf8a6b297960394f3f8df3bb44994 (diff)
downloadrockbox-a32a74e5910e979714b5e3384be369cc722ae03d.tar.gz
rockbox-a32a74e5910e979714b5e3384be369cc722ae03d.tar.bz2
rockbox-a32a74e5910e979714b5e3384be369cc722ae03d.zip
Multi-artist cd handling will take a bit more work. Last version was broken.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6278 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/songdb.pl')
-rwxr-xr-xtools/songdb.pl27
1 files changed, 13 insertions, 14 deletions
diff --git a/tools/songdb.pl b/tools/songdb.pl
index 11bf878057..69a3b0ae1b 100755
--- a/tools/songdb.pl
+++ b/tools/songdb.pl
@@ -153,16 +153,6 @@ sub dodir {
$path = $1;
}
- $entries{$path}= $id3;
- $artists{$id3->{'ARTIST'}}++ if($id3->{'ARTIST'});
- $genres{$id3->{'GENRE'}}++ if($id3->{'GENRE'});
- $years{$id3->{'YEAR'}}++ if($id3->{'YEAR'});
-
- # fallback names
- $$id3{'ARTIST'} = "<no artist tag>" if ($$id3{'ARTIST'} eq "");
- $$id3{'ALBUM'} = "<no album tag>" if ($$id3{'ALBUM'} eq "");
- $$id3{'TITLE'} = "<no title tag>" if ($$id3{'TITLE'} eq "");
-
# Only use one case-variation of each album/artist
if (exists($lcalbums{lc($$id3{'ALBUM'})})) {
# if another album with different case exists
@@ -181,10 +171,19 @@ sub dodir {
$lcartists{lc($$id3{'ARTIST'})} = $$id3{'ARTIST'};
}
- # prepend Dir name to handle duplicate album names in different
- # dirs. Meaning multi-artist cds will be handled correctly if
- # put in a single directory.
- my $albumid = $id3->{'ALBUM'}."___".$dir;
+ $entries{$path}= $id3;
+ $artists{$id3->{'ARTIST'}}++ if($id3->{'ARTIST'});
+ $genres{$id3->{'GENRE'}}++ if($id3->{'GENRE'});
+ $years{$id3->{'YEAR'}}++ if($id3->{'YEAR'});
+
+ # fallback names
+ $$id3{'ARTIST'} = "<no artist tag>" if ($$id3{'ARTIST'} eq "");
+ $$id3{'ALBUM'} = "<no album tag>" if ($$id3{'ALBUM'} eq "");
+ $$id3{'TITLE'} = "<no title tag>" if ($$id3{'TITLE'} eq "");
+
+ # prepend Artist name to handle duplicate album names from other
+ # artists
+ my $albumid = $id3->{'ALBUM'}."___".$id3->{'ARTIST'};
if($albumid ne "<no album tag>___<no artist tag>") {
my $num = ++$albums{$albumid};