Almost supports multiple-artist albums - needs a special case for songs with no album tag
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6279 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a32a74e591
commit
c5056b1d7f
1 changed files with 5 additions and 5 deletions
|
@ -181,11 +181,11 @@ sub dodir {
|
||||||
$$id3{'ALBUM'} = "<no album tag>" if ($$id3{'ALBUM'} eq "");
|
$$id3{'ALBUM'} = "<no album tag>" if ($$id3{'ALBUM'} eq "");
|
||||||
$$id3{'TITLE'} = "<no title tag>" if ($$id3{'TITLE'} eq "");
|
$$id3{'TITLE'} = "<no title tag>" if ($$id3{'TITLE'} eq "");
|
||||||
|
|
||||||
# prepend Artist name to handle duplicate album names from other
|
# Append dirname, to handle multi-artist albums
|
||||||
# artists
|
$$id3{'DIR'} = $dir;
|
||||||
my $albumid = $id3->{'ALBUM'}."___".$id3->{'ARTIST'};
|
my $albumid = $id3->{'ALBUM'}."___".$$id3{'DIR'};
|
||||||
|
|
||||||
if($albumid ne "<no album tag>___<no artist tag>") {
|
if($id3->{'ALBUM'}."___".$id3->{'ARTIST'} ne "<no album tag>___<no artist tag>") {
|
||||||
my $num = ++$albums{$albumid};
|
my $num = ++$albums{$albumid};
|
||||||
if($num > $maxsongperalbum) {
|
if($num > $maxsongperalbum) {
|
||||||
$maxsongperalbum = $num;
|
$maxsongperalbum = $num;
|
||||||
|
@ -443,7 +443,7 @@ if ($db) {
|
||||||
|
|
||||||
for (sort keys %{$artist2albums{$artist}}) {
|
for (sort keys %{$artist2albums{$artist}}) {
|
||||||
my $id3 = $artist2albums{$artist}{$_};
|
my $id3 = $artist2albums{$artist}{$_};
|
||||||
my $a = $albumcount{"$$id3{'ALBUM'}___$$id3{'ARTIST'}"} * $albumentrysize;
|
my $a = $albumcount{"$$id3{'ALBUM'}___$$id3{'DIR'}"} * $albumentrysize;
|
||||||
dumpint($a + $albumindex);
|
dumpint($a + $albumindex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue