Bug 2509 - Errouneous grouping of albums with commom title
: Errouneous grouping of albums with commom title
Status: RESOLVED WORKSFORME
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: 6.5b1
: PC Windows XP
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-07 00:34 UTC by sbjaerum
Modified: 2005-11-08 02:29 UTC (History)
0 users

See Also:
Category: ---


Attachments
zip-file containf two Greatest Hits flacs (10.15 KB, application/octet-stream)
2005-11-07 00:35 UTC, sbjaerum
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sbjaerum 2005-11-07 00:34:05 UTC
I will attach a zip file containing two album flacs each containing an album titled 'Greatest Hits' but by different artists.
When extracting the two flac files, ensure to put them in different directories.

Allthough these two files contains two completely different albums, they are grouped together when browsing by albums, and they are also are counted as one album in the album count display.

The error was introduced in r5014, r5013 works correctly.

The problem is that with r5014 the code inside this if statement in DBIStore.pm IS NOT run:

if ($albumObj && $checkDisc && !$attributes->{'COMPILATION'}) {

	my %tracks     = map { $_->tracknum, $_ } $albumObj->tracks;
	my $matchTrack = $tracks{ $track->tracknum };

	if (defined $matchTrack && dirname($matchTrack->url) ne dirname($track->url)) {

		$albumObj = undef;

		$::d_info && msg("_postCheckAttributes: Wrong album '$album' found\n");
	}
}

In r5013 the code inside the if statement IS run and two separate albums show up.
The reason for the different behavior is that the code calculating $checkDisc has changed from r5013 to r5014.

(I have also noticed that if the attached flac files are placed in the same directory they are combined into one album both in r5013 and r5014. Is this by intention?)
Comment 1 sbjaerum 2005-11-07 00:35:01 UTC
Created attachment 997 [details]
zip-file containf two Greatest Hits flacs
Comment 2 sbjaerum 2005-11-07 03:39:01 UTC
The reason for the problem is that !$checkDisk is used in the if test in r5013, while in r5014 $checkDisc is used. Reverting to !$checkDisk in r5014 (and later revisions) fixes the problem.

I don't know if this problem only happens for album flacs, or if it is a general problem...
Comment 3 KDF 2005-11-07 22:31:35 UTC
what is your setting for "specify common album titles"?
Comment 4 sbjaerum 2005-11-08 02:29:07 UTC
OK, got it. If I specity "Greatest Hits" in th 'Common Album Titles' list, the albums are grouped correctly. Thanks.