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
Unicode sorting for music folder "broken" #212
Comments
Never noticed this before, but you're right. In Web UI (and iPeng): Home > Music Folder > FLACs Haydn, Joseph LMS 7.9.2 - 1533559127 |
FWIW: "regular" browsing is using SQLite's sorting routines which comes with extensive ICU (https://en.wikipedia.org/wiki/International_Components_for_Unicode) support. BMF isn't using SQLite. We'd have to somehow implement ICU support for this separately. |
...or we use a temporary SQLite table rather than internal data structures to handle this. Just an idea. Not saying I'm going to investigate this any time soon. Or not. Whatever. :-D |
008_bmf_sort_fix_v2.patch.txt |
Your patch wouldn't really fix the sorting, as it's much more complicated than that. It needs to take locale into account. Eg. in German Hand < Händel < Haydn. But in English Hand < Haydn < Händel. |
009_env_var_for_lms_sort_lang.patch.txt |
Hmm... interesting. The second patch must be for something else, as it's dealing with SQLite - which we're not using for BMF. But I looked again at the code around the first patch. It does indeed take collation into account in some way. I'll play with that. Thanks a lot! |
Sorry... I really didn't remember anymore what's the reason for second patch 😂️. I though it was relevant for this but it's actually taking care that LMS sorting is done according to Daphile setting even if the user has selected different language in LMS settings. |
One more detail. It's important to set LC_CTYPE to corrent sorting locale because LMS switches it temporarily to LC_COLLATE in Slim/Music/Info.pm sortFilename. See here: |
Ok, things are a little complicated 😁. Your patch indeed does work as expected on Linux. But it breaks sorting on Windows... and macOS wouldn't sort correctly using I'm going to split this up per OS: keep existing method for Windows, re-write using SQLite's collation for macOS, use your method for all other systems... |
Unicode sorting for music folder "broken". Sorting for folders with "latin" names is fine.
Build - Logitech Media Server Version: 7.9.2 - 1533033975
The text was updated successfully, but these errors were encountered: