Bug 1955 - Single Artist Album wrongly recognized as Various Artists
: Single Artist Album wrongly recognized as Various Artists
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: unspecified
: Macintosh All
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-08-09 16:04 UTC by Michel Marti
Modified: 2008-09-15 14:36 UTC (History)
0 users

See Also:
Category: ---


Attachments
an mp3 file... (4.53 MB, audio/mpeg)
2005-08-09 16:09 UTC, Michel Marti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Marti 2005-08-09 16:04:40 UTC
I have a couple of "non-compilation" albums that now show up in "Various
Artists". I am currently at SVN revision 3912. I rip/encode CDs using iTunes on
MacOSX (making use of the "Compilations" flag if appropriate), storing the
resulting files over a Samba Share on a Debian box. I do NOT use slimservers
"iTunes" support since I point slimserver directly to the directory holding my
music files.

I attached one of those files that wrongly end up in "Various Artists" (even if
it is the only song available). E.g. copy the file to an empty directory, point
slimserver to this directory, remove the cache and start slimserver.

Calling "id3v2 -l" on this file produces:

id3v2 tag info for Welcome.mp3:
TIT2 (Title/songname/content description): Welcome
TPE1 (Lead performer(s)/Soloist(s)): 311
TALB (Album/Movie/Show title): Music
TYER (Year): 1993
TRCK (Track number/Position in set): 1/12
TCON (Content type): Alternative & Punk (255)
COMM (Comments): (ID3v1 Comment)[XXX]: 00000DC6 00000D7E 00012202 00013E83
0001AAD6 0001AAD6 00008A8D 000089BD 00020263 0001CFFA
TCOM (Composer): 311
TENC (Encoded by): iTunes v4.7
APIC (Attached picture): ()[, 0]: image/png, 172415 bytes
TLEN (Length): 175000

I added some debug logging to DBIStore.pm:

--- Slim/DataStores/DBI/DBIStore.pm     (revision 3912)
+++ Slim/DataStores/DBI/DBIStore.pm     (working copy)
@@ -775,7 +775,9 @@
 
        for my $track ($obj->tracks) {
 
+               $::d_import && Slim::Utils::Misc::msgf("Processing track %s\n",
$track);
                my $artist = $track->artist;
+               $::d_import && Slim::Utils::Misc::msgf("Artist for track: %s\n",
$artist);
 
                if ($artist && ref($artist) && $artist->can('id')) {
 
@@ -784,6 +786,7 @@
        }
 
        # Not a VA album.
+       $::d_import && Slim::Utils::Misc::msgf("scalar keys: %d\n", scalar keys
%artists);
        return 1 if scalar keys %artists == 1;
 
        $::d_import && Slim::Utils::Misc::msgf("Marking album: [%s] as Various
Artists.\n", $obj->title);

And this produces the following log entries for the file attached:

2005-08-10 00:46:56.0890 Processing track file:///opt/iTunesTest/Welcome.mp3
2005-08-10 00:46:56.0921 Artist for track: 
2005-08-10 00:46:56.0924 scalar keys: 0
2005-08-10 00:46:56.0926 Marking album: [Music] as Various Artists.
2005-08-10 00:46:56.1134 Finished with mergeVariousArtistsAlbums()
Comment 1 Michel Marti 2005-08-09 16:09:06 UTC
Created attachment 709 [details]
an mp3 file...
Comment 2 Michel Marti 2005-08-10 11:35:10 UTC
With revision 3913, the attached file is no longer recognized as "Various
Artist" but it doesn't show up at all in "Browse Artist, Browse Album, Browse
Genre". It is still visible in "Browse music folder". Slimserver states that
"Your music library contains 1 album with 1 song by 0 artists."
Comment 3 Dan Sully 2005-08-11 18:35:52 UTC
Fix checked into subversion change 3945. It will be in the 2005-08-12 6.2 nightly build.
Comment 4 Michel Marti 2005-08-12 12:17:41 UTC
Dan,

your change to DBIStore.pm now causes slimserver to crash when scanning:

Unmatched ) in regex; marked by <-- HERE in m/^S. Porcaro & J. Bettis) <-- HERE
$/ at /opt/slimserver-svn/server/Slim/DataStores/DBI/DBIStore.pm line 1646.

Not being a Perl programmer at all, I naively changed DBIStore.pm like this:

===================================================================
--- Slim/DataStores/DBI/DBIStore.pm     (revision 3950)
+++ Slim/DataStores/DBI/DBIStore.pm     (working copy)
@@ -1643,7 +1643,7 @@
                #
                # If we come across that case, force the creation of a second
                # contributorTrack entry.
-               if ((grep { /^$contributor$/ } values %{$attributes}) && $tag !~
/ARTIST$/) {
+               if ((grep { "/^$contributor$/" } values %{$attributes}) && $tag
!~ "/ARTIST$/" ) {
 
                        $forceCreate = 1;
                }


Scanning now completes; I have a "Various Artists" Entry in "Browse Artists"
that looks good, but the "Browse Artists" list now again contains every Artist
in my collection - even those that only have a single track on a "Compilation"
album.
Comment 5 Dan Sully 2005-08-12 23:45:57 UTC
Fix checked in as subversion change 3956.

Please let me know if it's fixed for you. A wipe & rescan will be needed.
Comment 6 Michel Marti 2005-08-14 06:48:03 UTC
Now works for me with change 3956. Thanks!

By the way: Is there another solution for keeping the "Various Artists" entry at
the top of the artist list other than naming "Various Artists" something like
"000 Various Artists"?
Comment 7 Dan Sully 2005-08-14 12:11:00 UTC
Not at this time.