PDA

View Full Version : Asset v3 Sort Tags



GaryL
12-22-2010, 06:42 AM
I prefer to sort my albums by artist surname, but to display in the UI/DS in "firstname lastname" format. So, I was really pleased to see that v3 introduced support for the use of Sort tags. None of my ca 12000 FLAC files had the sort tags already - I'd previously had the convention of writing AlbumArtist as "lastname, firstname" and Artist as "firstname lastname". So I performed a bulk update. I used MP3Tag to export a metadata CSV file, manipulated the contents in MS Access and reimported the modified data as a CSV, again using MP3Tag. This was a single pass process, so every file was handled identically with respect to Tag names etc.

Unfortunately, I'm at a loss to understand the way Asset has handled this.
For about 80% of artists/albumartists, Kinsky Desktop displays things exactly as I expected. So, depending on the "Artist Sort Handling" option, Jackson Browne is sorted under B, J or both.
The other 20% of albums always appear to be sorted by first name, irrespective of the Asset configuration option. So, for example, Annie Lennox always appears under A in both Artist and AlbumArtist trees.


I can see no obvious problems with the metadata. Below are exports from the Converter's Write Metadata effect from the two artists I've mentioned above:

<IDTags>
<AccurateRipResult>AccurateRip: Accurate (confidence 8) [9404D8D7]</AccurateRipResult>
<AccurateRipDiscID>010-000f0ee5-0078d56d-7509a80a-1</AccurateRipDiscID>
<Title>Take It Easy</Title>
<Composer>Jackson Browne Mad Lion Duke Ellington Glenn Frey</Composer>
<UPC>075596062626</UPC>
<Style>Soft Rock Folk-Rock Psychedelic Singer/Songwriter Contemporary Pop/Rock</Style>
<Rating>10</Rating>
<Album>For Everyman</Album>
<Genre>Rock</Genre>
<AlbumArtistSort>Browne, Jackson</AlbumArtistSort>
<Artist>Jackson Browne</Artist>
<ArtistSort>Browne, Jackson</ArtistSort>
<Year>1973</Year>
<replaygain_track_gain>-6.06 dB</replaygain_track_gain>
<replaygain_track_peak>0.999969</replaygain_track_peak>
<Track>1/10</Track>
<Disc>1/1</Disc>
<albumartist>Jackson Browne</albumartist>
</IDTags>



<IDTags>
<AccurateRipResult>AccurateRip: Accurate (confidence 14) [E2782172]</AccurateRipResult>
<AccurateRipDiscID>014-00209425-0159e7d9-c80e910e-1</AccurateRipDiscID>
<Title>Little Bird</Title>
<Composer>Annie Lennox</Composer>
<UPC>886973692622</UPC>
<Style>Adult Alternative Pop/Rock Club/Dance Pop/Rock Adult Contemporary</Style>
<Album>The Annie Lennox Collection</Album>
<Genre>Rock</Genre>
<Rating>7</Rating>
<Disc>1/1</Disc>
<AlbumArtistSort>Lennox, Annie</AlbumArtistSort>
<Artist>Annie Lennox</Artist>
<ArtistSort>Lennox, Annie</ArtistSort>
<Year>2009</Year>
<Track>1/14</Track>
<albumartist>Annie Lennox</albumartist>
<replaygain_track_gain>-8.85 dB</replaygain_track_gain>
<replaygain_track_peak>0.988861</replaygain_track_peak>
</IDTags>


I've tried getting Asset to do a complete rescan, but the behaviour seems to be exactly the same afterwards. Any suggestions?

Thanks

Gary

mville
12-22-2010, 07:42 AM
I posted a similar issue back in October (thread title Album Artist sort problem) which was never resolved.

I'm hoping Spoon is working to fix the sort issues with Asset v3.

GaryL
12-23-2010, 05:35 AM
Sorry, I must have missed your earlier thread.

Now that I've seen it, I tried your trick of eliminating numerics (renaming 10CC to Ten CC, 10,000 Maniacs to Ten Thousand Maniacs etc) then doing a full scan. Unfortunately, this didn't resolve the sorting issue for me. I guess there is something more subtle going wrong.

Gary

GaryL
12-24-2010, 09:28 AM
I've been dabbling with SQLite3 and have exported the tables from the UMediaLibraryMainDBv3.bin for analysis in MS Access. Looking at the t_artist table, I can see that for the "problem" artists, the "firstname lastname" form appears in the storedvalue column, but the sortvalue column is unpopulated - despite the fact that the Artist Sort and Album Artist Sort tags are correctly populated with the "lastname, firstname" text.

The table seems to act as a single name mapper, incorporating contents from (at least) the Artist and AlbumArtist tags and their corresponding sort tags. I've populated those consistently, but is it picking up names from any other fields?

Looking at uMediaTable, it seems that t_artist is also used to map composer. This is a tag that I don't really use for browsing, but gets populated automatically during CD rips. As a result, I haven't bothered to populate Composer Sort. As an experiment, I identified all tracks that had "Annie Lennox" as one of their composers and constructed suitable Composer Sort tags. After a rescan, lo and behold the record in t_artist is correctly populated with both variants of her name; her albums now appear correctly sorted in Kinsky desktop.

I still can't explain the seemingly random selection of which artists sort correctly and which don't. I've plenty of others that sort correctly but are also composers (with no Composer Sort). Is it possible this is simply down to the order in which the scan happens to encounter the name - with the last instance winning? In this case, if a Composer instance happens to be encountered last, it will nullify any sort value picked up from Artist/AlbumArtist. Might it not be better if a null Sort value did not overwrite a Sort value that was already present in t_artist?

Gary

Spoon
12-26-2010, 06:28 AM
Did these tracks have multiple artists on the track?

GaryL
12-28-2010, 11:54 AM
No, most did not have multiple artists on a track, though there would be many instances where the offending artist would be one of several composers on a track.

Gary

GaryL
12-29-2010, 07:13 AM
Spoon,

After further analysis, I now have a model that explains which albums sort correctly and which don't. Perhaps you could comment on whether the scan follows the logic I've suggested below.

I can see from AudioFilesIndB.bin that files were scanned in alphabetical order of the full filename path. My naming convention is to use folders named AlbumArtist\Album where AlbumArtist is in Lastname, Firstname form.
The first time the scan encounters a name in Artist, AlbumArtist or Composer, it writes that name, together with the corresponding sort value into t_artist.
If it encounters the same name later in the scan, it does not modify t_artist - it simply references the iId of the record it created earlier.


In my case the issue that arises with, say Annie Lennox, is:

The first time it encounters her name is as the composer, but not artist or album artist, of a track by the Eurythmics (which it meets before Lennox, Annie).
The file hasn't got a Composer Sort tag, so no value is written to the sortvalue column.
Subsequently when it scans tracks whose AlbumArtist or Artist is Annie Lennox, it does not write to t_artist and my Album Artist Sort and Artist Sort tags are ignored.


I've done a full analysis in my Access clone of uMediaLibraryMainDBv3.bin, and found that the above logic can be used to predict accurately which artists will sort correctly and which don't.

Gary

GaryL
01-01-2011, 08:13 AM
After my previous analysis, I was left with two choices to achieve proper sorting of Artis/AlbumArtist:

Get rid of all Composer tags
Correctly populate ComposerSort, for those files that did have Composer tags


Being a glutton for punishment, I chose the latter approach. The result in KinskyDesktop was different but still far from correct. The problem arises from the presence of multiple composers. These are represented in the FLAC files as multiple Composer tags, each with a single name. I created the same number of ComposerSort tags with the corresponding sort names. I confirmed using a binary file editor that the order of tags within the file was as intended, so that it should be possible for the scan to match each composer name with its corresponding sort tag:

yComposer=Kim CarnesComposer=Dave EllingsonComposer=Eric KazComposer=Wendy WaldmanComposerSort=Carnes, KimComposerSort=Ellingson, DaveComposerSort=Kaz, EricComposerSort=Waldman, Wendy DATE=

However, I found the following:

dBpoweramp's Edit ID Tag feature correctly handles multiple Composer tags, presenting them in the UI as a single string with semi-colon separator(s). It does not work correctly for multiple ComposerSort tags - it only shows the last instance in the file. If multiple ComposerSort names are entered with semi-colon separators, the whole lot is written as a single string rather than as multiple tags. So, I couldn't use it to make my changes.
The same behaviour carries through to an Asset scan. As noted before, the first instance of a name wins when building t_artist:

If this is Artist or AlbumArtist, the associated Sort value is correctly picked up in t_artist (I have no files with multiple instances of these tags).
If it is the first Composer tag in the file, the value of the last(!) ComposerSort tag is entered into the t_artist record. This is often the wrong person. In the above example, the record for "Kim Carnes" has "Waldman, Wendy" as its sortvalue.
If it is the second or susequent Composer tag in the file, no sortvalue is written to t_artist, so this artist is sorted in Kinsky by firstname rather than last name.



I'm left with the conclusion that the only realistic way to get Artist/AlbumArtist sorts working correctly is to completely eliminate Composer tags from all files.

Gary

Spoon
01-12-2011, 07:24 AM
Gary,

I will make a note that if there is no stored sort in an already stored artist/composer name and the tag has it to update.

Multiple sort tags are not handled.

GaryL
01-16-2011, 08:41 AM
Spoon,

Thanks for that. For the time being, I've moved all Composer data to custom "XComposer" tags; sorting is now working perfectly. I can then easily move the data back to the right place if/when you make the change you have described.

Cheers

Gary

mville
01-26-2011, 08:44 AM
Yes, I too can confirm that if Composer and ComposerSort tags are populated, this has an impact on the sort order. All my flacs contain Composer and ComposerSort tags.

A good example of this is where Fleetwood Mac albums are sorted under 'B', I guess this is because many of the Composer tags contain 'Lindsey Buckingham' and ComposerSort contain 'Buckingham, Lindsey'.

I look forward to a resolution to the sorting problems.

mville
03-22-2011, 06:51 AM
Are we close to a resolution to the Asset sorting issues?

Spoon
03-22-2011, 06:57 AM
Not at the moment sorry, work is progressing on R14.1 to finalize this before moving onto Asset R3.1