Bug 4582 - ALBUMARTIST causes problem with ARTISTSORT in single album FLAC files
: ALBUMARTIST causes problem with ARTISTSORT in single album FLAC files
Status: RESOLVED WONTFIX
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 6.5.1
: PC Debian Linux
: P2 enhancement with 1 vote (vote)
: Future
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-10 05:39 UTC by Andy Hawkins
Modified: 2011-04-07 11:29 UTC (History)
4 users (show)

See Also:
Category: ---


Attachments
Tags dump from one of my files (83.90 KB, text/plain)
2006-12-14 02:55 UTC, Andy Hawkins
Details
Output of scanner.pl (35.18 KB, text/plain)
2007-03-08 01:33 UTC, Andy Hawkins
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Hawkins 2006-12-10 05:39:44 UTC
Hi,

I rip my music to a single FLAC file for each CD. Each FLAC file has VORBIS comments in the following form

ARTIST=Artist Name
ARTISTSORT=Name, Artist
ALBUMARTIST=Artist Name
ALBUM=Some Album
TRACKNUMBER[1]=1
ARTIST[1]=Artist Name
ARTISTSORT[1]=Name, Artist
TITLE[1]=Track Number 1
ARTIST[2]=Artist Name
ARTISTSORT[2]=Name, Artist
TITLE[2]=Track Number 2
ARTIST[3]=Artist Name
ARTISTSORT[3]=Name, Artist
TITLE[3]=Track Number 3

If I have the 'ALBUMARTIST' track present, then the ARTISTSORT tag appears to be ignored. If I removed the ALBUMARTIST tag, ARTISTORT is applied correctly.
Comment 1 Chris Owens 2006-12-12 15:58:46 UTC
Ross could you have a look at this?  I would try to reproduce just by editing the flac tags first and if you cannot reproduce, doing some research into the VORBIS tags mentioned.
Comment 2 Andy Hawkins 2006-12-13 01:55:16 UTC
I can provide a full dump of all the tags for one of my FLAC files if it would help. You could then try it with and without the 'ALBUMARTIST' tag (I'm currently running with it removed)

Andy
Comment 3 Ross Levine 2006-12-13 11:16:24 UTC
Andy,

Sounds great, go ahead and attach any files you think will help us out. 
Comment 4 Andy Hawkins 2006-12-14 02:55:06 UTC
Created attachment 1741 [details]
Tags dump from one of my files

This file is a dump of tags from one of my files. As is, the sort field in the database will end up as 'Brown, Sam'. If I add 'ALBUMARTIST=Sam Brown', the sort field will be 'Sam Brown'
Comment 5 Ross Levine 2006-12-20 17:09:51 UTC
Andy what application are you using to edit vorbis comments on your flac files? 
Comment 6 Andy Hawkins 2006-12-21 01:17:12 UTC
This is all under Linux, so I either use metaflac to export them to a text file, edit them and re-import using metaflac, or I use an application I wrote myself that uses libflac++ to write them.

I don't think this is necessarily relevant, but am prepared to try another method if you think it would help isolate the problem.
Comment 7 Ross Levine 2006-12-21 17:10:26 UTC
Andy would it be possible for you to send me the file you're able to reproduce this behavior with? I realize it's probably a very large file; you could send it to me via www.dropload.com to ross@slimdevices.com. 
Comment 8 Andy Hawkins 2006-12-22 02:03:08 UTC
Are you having problems recreating this? It was fairly obvious when I tries. Scanning a file without an ALBUMARTIST tag worked fine, if I added the ALBUMARTIST tag, then the sort name was overwritten.

Perhaps something has changed in a recent nightly?
Comment 9 Ross Levine 2006-12-22 15:14:11 UTC
The reason I'm asking for a sample file of yours is I think it would help me to reproduce this. None of the utilities I've used for adding/changing vorbis comments on a flac file show me anything similar to what you're showing. Would you mind sending me a sample file to demonstrate this issue? If it's too much trouble I understand. I'll be working on this here on my end, but it may take me a few more days. 
Comment 10 Andy Hawkins 2006-12-23 16:08:03 UTC
Hmm, this is odd. I've just tried to recreate it myself (after updating to the latest code) and I'm no longer seeing this behaviour.

I'm not sure if anything has changed in the last week or two that might have fixed this? My svn update certainly grabbed a lot of files.

I'll keep an eye on it and see if I can work out what's going on.

Andy
Comment 11 Ross Levine 2006-12-26 11:14:01 UTC
A festivus miracle perhaps... Keep us posted please. 
Comment 12 Chris Owens 2007-02-12 14:40:28 UTC
Andy, were you ever able to see this again?  Thanks.
Comment 13 Andy Hawkins 2007-02-12 15:04:47 UTC
Yes

Just changed all of my 'Sam Brown' collection to include tags like:

ALBUM=Stop!
ALBUMARTIST=Sam Brown
ARTIST=Sam Brown
ARTISTSORT=Brown, Sam

...

TRACKNUMBER[1]=1
ARTIST[1]=Sam Brown
ARTISTSORT[1]=Brown, Sam
MUSICBRAINZ_ARTISTID[1]=8ec33fe2-4775-474c-a4a8-65dbbb98f87c
MUSICBRAINZ_TRACKID[1]=a803c6cf-9616-4fc6-8c87-08789932521c
TITLE[1]=Walking Back to Me
TRACKNUMBER[2]=2
ARTIST[2]=Sam Brown
ARTISTSORT[2]=Brown, Sam
MUSICBRAINZ_ARTISTID[2]=8ec33fe2-4775-474c-a4a8-65dbbb98f87c
MUSICBRAINZ_TRACKID[2]=3c77ceaf-5ee6-432d-adae-5da7426b2dd0

And Sam Brown is appearing under 'S'. The sort field in the database is 'SAM BROWN'

Andy

Comment 14 Ross Levine 2007-02-13 16:43:23 UTC
So artistsort is broken again? Andy would you mind attaching the Sam Brown file please?
Comment 15 Andy Hawkins 2007-02-14 02:32:14 UTC
Correct, the ARTISTSORT breaks when I add an 'ALBUMARTIST' tag.

I have several Sam Brown albums. The smallest one is 78 Meg.

Anywhere I can upload it to make it available to you?

Andy
Comment 16 Ross Levine 2007-02-15 11:32:42 UTC
Andy,

I think I may need to have a look at your files. I'm not able to reproduce this. I'm using SlimServer 6.5.1 on Ubuntu with two flac files. One of them I have tagged with Artist Name "Sam Brown", Album Artist as "Sam Brown", and Artist Sort as "Brown, Sam". 

The other artist name starts with N, and when I browse -> artists in SlimServer it's correctly sorting Sam Brown before the song titles with N. 

Andy would you mind sending the offending file(s) to me via dropload.com? ross@slimdevices.com
Comment 17 Andy Hawkins 2007-02-16 03:11:44 UTC
Ok, I've uploaded one of my files here:

http://www.gently.org.uk/uke.flac

All of my files are tagged virtually the same (I use a program I wrote to download data from MusicBrainz and do the tagging).

My database shows the following:


mysql> select * from contributors where name like "%Sam Brown%";
+----+-----------+-----------+------------+--------------+--------------+-------------------+----------------+--------------------+
| id | name      | namesort  | namesearch | customsearch | moodlogic_id | moodlogic_mixable | musicbrainz_id | musicmagic_mixable |
+----+-----------+-----------+------------+--------------+--------------+-------------------+----------------+--------------------+
| 10 | Sam Brown | SAM BROWN | SAM BROWN  | 0726027696   |         NULL |              NULL | NULL           |               NULL |
+----+-----------+-----------+------------+--------------+--------------+-------------------+----------------+--------------------+
1 row in set (0.00 sec)

If I remove the 'ALBUMARTIST' tag, then the namesort value becomes correct (Brown, Sam)

Please let me know when you've downloaded this file so that I can delete it.

Andy

Comment 18 Andy Hawkins 2007-02-16 03:31:21 UTC
Just for info, this is the output of my svn info in the slimserver directory

andy@gently:/usr/lib/slimserver/server$ svn info
Path: .
URL: http://svn.slimdevices.com/repos/slim/branches/6.5/server
Repository UUID: 60ad55ce-86ed-0310-8cf8-f9d879be5ea1
Revision: 11435
Node Kind: directory
Schedule: normal
Last Changed Author: titmuss
Last Changed Rev: 11414
Last Changed Date: 2007-02-12 20:18:12 +0000 (Mon, 12 Feb 2007)
Properties Last Updated: 2006-10-12 11:19:50 +0100 (Thu, 12 Oct 2006)

I tend to update every couple of days when I remember.

Andy
Comment 19 Ross Levine 2007-02-16 16:16:02 UTC
Andy,

Thanks for attaching. I've downloaded the file you can go ahead and remove it. It seems to work fine on my SlimServer XP instance, but I'm having issues with my debian instance. I might not be able to test this out until next week. I will comment again soon. 
Comment 20 Ross Levine 2007-02-21 15:59:52 UTC
Andy,

Just to clarify the exact problem: when you implement ALBUMARTIST, ARTISTSORT isn't working. In other words your Sam Brown album is being sorted (within browse -> artists) under S and not B? I've just tried this with SlimServer 6.5.1 on Ubuntu 6.06.1 and it's sorting it properly for me. Am I correctly summarizing the exact issue? 
Comment 21 Andy Hawkins 2007-02-22 01:24:39 UTC
That is correct, yes.

As you can see from the database listing I provided in comment #17, the 'namesort' column is incorrect.

Are there any useful flags I can pass to the scanner process that might help in the diagnosis?

Andy
Comment 22 Ross Levine 2007-03-07 17:06:48 UTC
If you'd like you can try d_scan and d_source. 

Is it possible that another file is causing some confusion here? I'm not sure how this is possible if I'm using the same file you are, what are you comparing against in terms of sort order? Do you have any ideas what might be causing this?
Comment 23 Andy Hawkins 2007-03-08 01:19:16 UTC
Ok, I'll do a scan of my Sam Brown directory with those flags.

I'm not sure what you mean by another file affecting it. I have no other music by Sam Brown except what's in this directory (nothing on any compilations or anything).

As to what I'm comparing it against, in comment #17 I included a database dump for the Sam Brown contributor, that clearly shows the 'NAMESORT' column containing 'SAM BROWN' and not 'BROWN, SAM'

Andy
Comment 24 Andy Hawkins 2007-03-08 01:31:31 UTC
Ok, the following command:

./scanner.pl --wipe --d_parse --d_source --d_sql /var/spool/music/FLAC/B/Sam\ Brown/Ukulele\ and\ Voice\ -\ 5\ Songs.../ 2>sambrown.txt

(--d_source is reported as an invalid argument)

produces the attached output.

As you can clearly see, the output contains the line:

2007-03-08 09:29:35.9634 INSERT INTO contributors (musicbrainz_id, name, namesearch, namesort) VALUES (?, ?, ?, ?): 'NULL', 'Sam Brown', 'SAM BROWN', 'SAM BROWN'

which is populating the namesort column with 'SAM BROWN'

If there's any more debugging arguments you'd like me to try, then just let me know.

Andy
Comment 25 Andy Hawkins 2007-03-08 01:33:17 UTC
Created attachment 1833 [details]
Output of scanner.pl

This is the output from:

./scanner.pl --wipe --d_parse --d_source --d_sql /var/spool/music/FLAC/B/Sam\ Brown/Ukulele\ and\ Voice\ -\ 5\ Songs.../ 2>sambrown.txt
Comment 26 Spies Steven 2007-03-12 12:15:55 UTC
Enhancement request Bug 4584 seems related.
Comment 27 Ross Levine 2007-03-22 11:56:37 UTC
This log seems as it should, it's picking up artistsort as Brown, Sam. 

Dan does anything seem out of the ordinary in his log?
Comment 28 Andy Hawkins 2007-03-22 13:26:00 UTC
But the SQL insert command is:

2007-03-08 09:29:35.9634 INSERT INTO contributors (musicbrainz_id, name, namesearch, namesort) VALUES (?, ?, ?, ?): 'NULL', 'Sam Brown', 'SAM BROWN', 'SAM BROWN'

No mention of 'Brown, Sam' anywhere on that line.

Andy
Comment 29 Ross Levine 2007-03-23 11:35:55 UTC
Ahh good point. Dan does this make any sense?
Comment 30 Ross Levine 2007-10-29 13:50:21 UTC
Until we support albumartistsort I don't see this bug making much progress. Changing the target accordingly. 
Comment 31 Chris Owens 2007-11-01 09:50:56 UTC
This is an odd approach to tagging.  We are already considering paying attention to an albumartistsort tag, but behaving properly with this tagging scheme would involve pretty major changes.
Comment 32 Mike Walsh 2011-03-06 09:55:06 UTC
(In reply to comment #31)
> This is an odd approach to tagging.  We are already considering paying
> attention to an albumartistsort tag, but behaving properly with this tagging
> scheme would involve pretty major changes.

i agree.  this bug should probably be closed, as well as the similar bug 6189

ALBUMARTIST tags should always take precendence over artist tags, of any type. 
a user could then just use ALBUMARTISTSORT which i believe SBS now supports

(one day, hopefully SBS will be smart enough to switch on the fly between
artists/albumartists, but thats not an issue for this bug)

see:

bug 5177

bug 11159