Solved "Various Artists" sorted wrong when using sort artist
#1
Hi there,

I am using Kodi 19 (Libreelec 9.95.2) with the "Use artist sortname when sorting by artist" option enabled. I have a large number of albums imported, only using the ID3-like tags present in the files (no online scraping). I actually manage my library with iTunes and only copy the files over to Kodi. All the files are *.m4a (AAC encoded). I guess iTunes uses its own tag format - Kid3, which I sometimes use for manual tagging, reports the tags not as ID3v2, but as mp4 tags.

In iTunes, you can set a "compilation" flag for each track. It seems that Kodi honours these flags and collects albums with the compilation flag set under the "Various Artists" artist (in my case it is localized to German, so the artist name is "Verschiedene Interpreten"). But this artist is not sorted properly when listing artists alphabetically. I would expect it under "V" (localized or not), but currently it shows up under "H".

The reason for that seems to be the following: especially for soundtrack albums, where an album mostly consists of tracks from one artist (the score) but has a single song from a different artist (the movie title song), I usually set an "album artist" (including the corresponding "sort album artist"), and I set this to the name of the main artist (i.e. the composer of the score). For example: the soundtrack to the movie Titanic has 14 tracks with track artist "James Horner" (sort artist: "Horner, James"), one track with track artist "Celine Dion" (sortartist: "Dion, Celine"), and all 15 tracks have the compilation flag set and have an album artist "James Horner" (sort album artist: "Horner, James").

It seems now that when the "Use artist sortname when sorting by artist" option is set, Kodi sets the sort artist for "Various Artists" to either the (track) sort artist or the album sort artist. Either way, in my case the sort artist for "Various Artists" is "Horner, James", hence it shows up under "H". This also affects applications using the Kodi API, in my case Yatse, where the sorting is wrong as well (I opened an issue there at first). Why this particular sort artist has been chosen I do not know, probably it was the first encountered by Kodi while reading the tags from the files.

I would consider this a bug - the automatically generated "Various Artists" artist should not be sorted by a sort artist provided in the tag. Or am I missing something here?

Thanks for any help or comments!
Reply
#2
That your "Various Artists" entry has a sortname of "Horner, James" would indeed cause the behaviour you experience, but having looked at your data (usefully uploaded on the Yatse forum) I can't see from the other data values how that would have happened. It will have come from the music file metadata, but it is not obvious how. 
 
Quote:I would consider this a bug - the automatically generated "Various Artists" artist should not be sorted by a sort artist provided in the tag.
Well you can tag music as having album artist "Various Artists" too, and if you do that then yes it would apply any album artist sortname tag va;lues that you provide with it. But yes I consider there is a problem somewhere.


I would like to dig into this more. If there is a flaw in the tag processing that combined with certain metadata can cause this then I would like to find it. Unfortunately without getting my hands on the music files, and tracing through the scanning process etc., I don't think I will be able to get any where with it.
Quote:All the files are *.m4a (AAC encoded). I guess iTunes uses its own tag format - Kid3, which I sometimes use for manual tagging, reports the tags not as ID3v2, but as mp4 tags.
Humm, that makes me wonder further if there is something in the metadata that Kodi is picking up that you are not seeing, in the "soaa" (Album Artist Sort) tag perhaps? Metadata in mp4 is newer and less common, and so possibly glitchy, it will have had nowhere near as much real world testing than say ID3 v2 for all software involved.

It seems rather impractical to ask you to provide access to the 130 music files that involve "James Horner" (all from your soundtracks folder), but that would be helpful. As a new forum member you can't send PMs yet, but we can work a way to keep links private.

Another route would be for you create a separate test installation of Kodi with an empty music library, and add albums involving James Horner one at a time to narrow it down to see when/if the "Various Artists" sort names changes. You could do this using any platform Kodi can run on, for example  with Wndows it is easy to run in portable mode and fiddle with different libraries. With LE you could take a back-up copy of databases and settings etc., or swap to a new SD card?

What can you provide me with?
Reply
#3
Hi Dave,

thank you for your elaborate answer. I can do both:
  • I can provide you with the files in question via a private link. I can put them on my own NextCloud server, so they would not be shared illegally through some public service. But how do I get the download link to you privately? Can you send PMs to me? Then you could provide me with an email address to send the link to, or with a PGP key to encrypt the link with, or with some upload possibility where I can upload a text file with the link, or ...
  • I can install Kodi on my Windows machine and add some songs to observe the behaviour.
So what do you prefer?
Reply
#4
Great you have a NextCloud, I'll poke about the files if you can put them up it will be quicker. Yes I can PM you Smile
Reply
#5
Ok, then just drop me a message where to leave the link (or maybe I can reply on your PM?). I am currently uploading a zip file with both the compilations and the non-compilations by James Horner. It has some 650 MB, so it might take a couple of minutes ;-)
Reply
#6
Ho, it seems I was too cocky. No I can't send you a PM after all. Not sure if receiving is something you can enable, or if the forum system is simply protecting us from each other.
Reply
#7
Email is on the way.
Reply
#8
Link received thanks, might take me a while but I'll let you know on any progress.
Reply
#9
Darned if I can see any issue with the metadata in those files, and when I scan them into a music library (either an empty one or existsing) I don't get any issues the sort name with "Various Artists" (it remians null in the artist table). I will keep looking, but I don't get it so far, and if I can't reproduce it I can't fix.

Then again I am doing this on Windows 10, and there are sometimes differences in DLL versions etc. on other platforms. So perhaps you could try scanning just this music into an empty music library using LibreElec and see what happens for the "Various Artists" sortname. If you just temporary rename the existing MyMusic82.db and take a copy of sources.xml that will give an empty library easily enough and a route to switch back.

I had not mentioned before but as a workaround you can easily enough edit the "Various Artists" row in the artist table, and clear out the sortname column. The will give you the correct artist order quickly, but I still would like to pin down why it was corrupted if I can.
Reply
#10
Sorry that I never got back to you on this. I wanted to create a test library on a fresh/separate installation and then somehow forgot about it.

I recently retagged about half of my library due to a change in my personal genre namings. After that, I rebuilt my lKodi music ibrary from scratch, i.e. emptied it and imported all tracks again. The problem described above did not occur again. I also looked into the artist table to make sure, and the sort name for various artists is empty as expected.

I am on LibreElec 10.0.1 in the meantime, maybe something got fixed or it was just some coincidence. Thanks again for looking into it.
Reply
#11
Thread marked solved.
Reply

Logout Mark Read Team Forum Stats Members Help
"Various Artists" sorted wrong when using sort artist0