Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Albums, Artists, etc. are sorted inconsistently #388

Closed
fastfwd-zz opened this issue Jul 14, 2020 · 2 comments
Closed

Albums, Artists, etc. are sorted inconsistently #388

fastfwd-zz opened this issue Jul 14, 2020 · 2 comments
Assignees
Labels
Milestone

Comments

@fastfwd-zz
Copy link

fastfwd-zz commented Jul 14, 2020

Description of the bug is here: https://forums.slimdevices.com/showthread.php?112584-Odd-display-of-artist-and-album-names&p=981764&viewfull=1#post981764

My guess as to the cause is here: https://forums.slimdevices.com/showthread.php?112584-Odd-display-of-artist-and-album-names&p=982041&viewfull=1#post982041

Briefly: The code that determines which items should be in each initial-letter bucket uses a sort that is sensitive to non-ASCII characters. But the code that then displays the contents of the buckets uses a sort that converts characters to ASCII first.

So the bucket-creation code puts accented-A buckets after the regular A bucket, but the bucket-display code then sorts all the accented-A items into the regular A bucket, so the final few regular A items are squeezed out of the regular A bucket and erroneously shown in the accented-A buckets.

@mherger mherger self-assigned this Jul 29, 2020
@mherger mherger added the bug label Jul 31, 2020
@mherger mherger added this to the 7.9.3 milestone Jul 31, 2020
@mherger
Copy link
Contributor

mherger commented Jul 31, 2020

I looked into this a little more. The problem is that the data's sort order is defined by SQLite (the database in the background) which is locale aware. It knows that in German "ü" would be treated the same as "u". But the code creating the paging bar simply gets the first letter of the "sortkey" value as defined in LMS (not locale aware). Therefore "ü" would be seen as something else than "u", grouping things incorrectly.

Now I only have to figure out how to work around this limitation...

@mherger
Copy link
Contributor

mherger commented Jul 31, 2020

Haha... I knew this issue kind of rang a bell with me. So I googled - and found a discussion on the SQLite mailing list I had started a little more than a year ago 😂 . See the following response (and the rest of the discussion) for an explanation why we fail:

https://www.mail-archive.com/sqlite-users@mailinglists.sqlite.org/msg113837.html

Unfortunately I don't have any idea how to work around this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants