Solved Strange behaviour with Artist Sort names
#1
A question about Artist sort names. When I browse through the artists, approx. 5% of the artists are not sorted correctly. The strange thing is that when browse through albums, sorted by artist, those 5% are sorted correctly.
Has anybody seen this behavior?

[EDIT: Split into own thread so can focus discussion -DB]
Reply
#2
(2017-09-06, 17:05)JanneT Wrote: A question about Artist sort names. When I browse through the artists, approx. 5% of the artists are not sorted correctly. The strange thing is that when browse through albums, sorted by artist, those 5% are sorted correctly.
Has anybody seen this behavior?

If you could upload your MusicXX.db file somewhere and post or PM me a link, so that I can download and examine it in more detail that would be great.

Oh and any example artists where you have notice this behaviour. Thanks
Reply
#3
(2017-09-06, 18:58)DaveBlake Wrote:
(2017-09-06, 17:05)JanneT Wrote: A question about Artist sort names. When I browse through the artists, approx. 5% of the artists are not sorted correctly. The strange thing is that when browse through albums, sorted by artist, those 5% are sorted correctly.
Has anybody seen this behavior?
If you could upload your MusicXX.db file somewhere and post or PM me a link, so that I can download and examine it in more detail that would be great.

Oh and any example artists where you have notice this behaviour. Thanks

I found out that in order to get the Album Artist Sort order correct in the database, you have to have the MusicBrainzAlbumID tag set for every album. This works even if the tag "value" is faked. Is this the intended behavior?

Anyway, I made a quick-and-dirty fix in infoscanner/MusicInfoScanner.cpp: 
Code:
  if (!tag.GetMusicBrainzAlbumID().empty())
    {
      VECALBUMS::iterator it;
      for (it = albums.begin(); it != albums.end(); ++it)
        if (it->strMusicBrainzAlbumID == tag.GetMusicBrainzAlbumID())
          break;
      if (it == albums.end())
      {
        CAlbum album(*items[i]);
        album.songs.push_back(song);
        albums.push_back(album);
      }
      else
        it->songs.push_back(song);
/* Quick and dirty fix */
    } else if (!tag.GetAlbum().empty())
    {
      VECALBUMS::iterator it;
      for (it = albums.begin(); it != albums.end(); ++it)
        if (it->strAlbum == tag.GetAlbum())
          break;
      if (it == albums.end())
      {
        CAlbum album(*items[i]);
        album.songs.push_back(song);
        albums.push_back(album);
      }
    }
    else
      songsByAlbumNames[tag.GetAlbum()].push_back(song);
  }

This seems to solve the problems for me. I don't know how this will affect the detection of compilations etc., but as I said, it's a quick-and-dirty fix :-)

Of course, this is not a permanent fix. I mean, an album name is not enough to identify a specific album. So it requires some more work unless this is the intended behavior.

Any comments?
Reply
#4
Janne, sorry for not responding sooner, afriad I lost sight of this issue so split into a thread of it's own. I did receive your data, but could not see anything unusual.
Quote:I found out that in order to get the Album Artist Sort order correct in the database, you have to have the MusicBrainzAlbumID tag set for every album. This works even if the tag "value" is faked. Is this the intended behavior?
That makes no sense to me either. I have over 500 albums without mbids, and the artist sort names works absolutely fine. Nor do I see how changes to MusicInfoScanner can help, although I do appreciate you being enthusiastic/frustrated enough to look at and modify code.

Can we roll back to basics, and I will try to be more attentive.
I suspect that your issue is related in some way to the tagging itself, many things come down to that.  Either faulty tagging, or some combination that my implementation has not accounted for (or both). There are some hints in the data entries for the example artists you mentioned that are not sorting.

Ale Möller
There are two artists like this a) Ale Moller (no acents) that does not have a sort name and b) Ale Möller Band that does "Möller, Ale, Band". 
There are songs from 2 albums, with "Ale Möller Band" as the song artist, and "Möller, Ale, Band" as sortname.
These albums - "Bodjal" and "Djef Djel" - have "Ale Moller" as the album artist. These do have "Moller, Ale" as sort name.

So why didn't "Moller, Ale" propagate to the artist entry?

Alexis Korner
There are two similar artists a) Alexis Korner that does not have a sort name and b) Alexis Korner's Blues Incorporated that  does.
There are songs from 3 albums, with "Alexis Korner's Blues Incorporated" as the song artist, and "Korner's, Alexis Blues Incorporated" as sortname.
These albums  have "Alexis Korner" as the album artist. These do have "Korner, Alexis" as sort name.

So why didn't "Korner, Alexis" propagate to the artist entry?

Others - Astor Piazzolla, Ben E. King, Brian Auger, Brian Blade and 25-30 - have a similar pattern.

Can you tell me how say files from "Bodjal" are tagged, specifically the ALBUMARTIST, ALBUMARTISTS, ALBUMARTISTSORT, ARTIST, ARTISTS and  ARTISTSORT tags.
Reply
#5
Yes, it's somewhat strange. I used the SQLite manager plugin for FireFox and could see that sortnames ware inserted into the album table, but not all of them was inserted in the artist table. Will check further...

Otherwise a workaround could be to add the Album MB tags again. I don't really care about the ID's but I guess that I could add any value to the tag as long as it is unique to each album-
Reply
#6
(2017-10-26, 14:29)DaveBlake Wrote: Janne, sorry for not responding sooner, afriad I lost sight of this issue so split into a thread of it's own. I did receive your data, but could not see anything unusual.
Quote:I found out that in order to get the Album Artist Sort order correct in the database, you have to have the MusicBrainzAlbumID tag set for every album. This works even if the tag "value" is faked. Is this the intended behavior?
That makes no sense to me either. I have over 500 albums without mbids, and the artist sort names works absolutely fine. Nor do I see how changes to MusicInfoScanner can help, although I do appreciate you being enthusiastic/frustrated enough to look at and modify code.

Can we roll back to basics, and I will try to be more attentive.
I suspect that your issue is related in some way to the tagging itself, many things come down to that.  Either faulty tagging, or some combination that my implementation has not accounted for (or both). There are some hints in the data entries for the example artists you mentioned that are not sorting.

Ale Möller
There are two artists like this a) Ale Moller (no acents) that does not have a sort name and b) Ale Möller Band that does "Möller, Ale, Band". 
There are songs from 2 albums, with "Ale Möller Band" as the song artist, and "Möller, Ale, Band" as sortname.
These albums - "Bodjal" and "Djef Djel" - have "Ale Moller" as the album artist. These do have "Moller, Ale" as sort name.

So why didn't "Moller, Ale" propagate to the artist entry?

Alexis Korner
There are two similar artists a) Alexis Korner that does not have a sort name and b) Alexis Korner's Blues Incorporated that  does.
There are songs from 3 albums, with "Alexis Korner's Blues Incorporated" as the song artist, and "Korner's, Alexis Blues Incorporated" as sortname.
These albums  have "Alexis Korner" as the album artist. These do have "Korner, Alexis" as sort name.

So why didn't "Korner, Alexis" propagate to the artist entry?

Others - Astor Piazzolla, Ben E. King, Brian Auger, Brian Blade and 25-30 - have a similar pattern.

Can you tell me how say files from "Bodjal" are tagged, specifically the ALBUMARTIST, ALBUMARTISTS, ALBUMARTISTSORT, ARTIST, ARTISTS and  ARTISTSORT tags.

ALBUM Bodjal
ALBUMARTIST Ale Möller
ALBUMARTISTSORT Möller, Ale
ARTIST Ale Möller Band
ARTISTSORT Möller, Ale, Band
GENRE Folk; World; Country
TITLE < keep >
TRACK < keep >
YEAR 2004

I tried to do a screen shot from mp3tag, but I couldn't upload the picture :-)
Reply
#7
I changed the ARTIST tags for the Ale Möller albums from "Ale Möller Band" to "Ale Möller" and now it's OK.

Another observation: when I exit Kodi after the scanning, Kodi exits with segmentation fault.
Reply
#8
(2017-10-26, 16:59)JanneT Wrote: Another observation: when I exit Kodi after the scanning, Kodi exits with segmentation fault.
If you can get it to happen repeatably when debug is on, and provide the debug log that could be useful
Reply
#9
OK, so there is an issue in the processing with getting the sortname for artists that are only album artists when music files do not have Muicbrainz id tags. I can look to fix that. Thanks for testing and for persisting with feedback on the issue, I do appreciate it. All I need now is more hours in the day!
Reply
#10
(2017-10-26, 16:59)JanneT Wrote: I changed the ARTIST tags for the Ale Möller albums from "Ale Möller Band" to "Ale Möller" and now it's OK.

Another observation: when I exit Kodi after the scanning, Kodi exits with segmentation fault.

Thinking about it I think all examples have different ALBUMARTIST and ARTIST tags
Reply
#11
(2017-10-26, 17:30)JanneT Wrote: Thinking about it I think all examples have different ALBUMARTIST and ARTIST tags
Yes, produicng artists that are only album artists. I now understand the issue and the cause, so I can fix it. Smile

I will post here when I have a test build with the fix. So if you can wait, and not re-tag, it would make a good test that I have solved it.
Reply
#12
(2017-10-26, 17:39)DaveBlake Wrote:
(2017-10-26, 17:30)JanneT Wrote: Thinking about it I think all examples have different ALBUMARTIST and ARTIST tags
Yes, produicng artists that are only album artists. I now understand the issue and the cause, so I can fix it.  Smile

I will post here when I have a test build with the fix. So if you can wait, and not re-tag, it would make a good test that I have solved it.

Thanks!
Reply
#13
OK there is a pre-PR test build from work in my repo here KodiSetup-20171105-562234c-AlbumArtistOnlySort. That is Win64, other platform versions are on the mirrors accordingly.

I suggest that you install a portable version http://kodi.wiki/view/Windows_FAQ#Portable_mode, set the advancedsettings.xml to use artist sort names and see what the results of adding your music source produce.
Reply
#14
OK, will test after work today
Reply
#15
Perfect! It seems to work very well. At least with my collection of albums.

I guess it will take a while before this fix will be included in the nightly builds.

Thanks again!
Reply

Logout Mark Read Team Forum Stats Members Help
Strange behaviour with Artist Sort names0