Fix: filesystem browse ignoring case (#451)
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Sun, 7 Aug 2022 23:08:04 +0000 (01:08 +0200)
committerGitHub <noreply@github.com>
Sun, 7 Aug 2022 23:08:04 +0000 (01:08 +0200)
Fix filesystem browse ignoring case

music_assistant/music_providers/filesystem/filesystem.py

index 783d43d0609611b0b3b31adc7cbf2d18e8acf7c6..841163857dc50ac0f6de54c9a71e0d6702c6df4d 100644 (file)
@@ -211,7 +211,7 @@ class FileSystemProvider(MusicProvider):
             path=path,
             name=sub_path or self.name,
             # make sure to sort the resulting listing
-            items=sorted(subitems, key=lambda x: x.name),
+            items=sorted(subitems, key=lambda x: (x.name.casefold(), x.name)),
         )
 
     async def sync_library(