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

Bug: capital letters are sorted before non capital letters in the browse view #104

Closed
iMelsom opened this issue Feb 12, 2021 · 6 comments
Closed
Labels
bug Something isn't working

Comments

@iMelsom
Copy link

iMelsom commented Feb 12, 2021

The stored song list is case sensistive now. It should be case insensitive

@vicwomg
Copy link
Owner

vicwomg commented Feb 12, 2021

Can you explain this further? I'm not sure I understand the issue.

@iMelsom
Copy link
Author

iMelsom commented Feb 12, 2021

In the song list for stored songs, captial letters are sorted before non capital letters. This means all songs or artists starting with a capital letter is listed before any songs or artists not starting with capital letters. See attached image

image

As Capital letters are listed before non capital letters, sorting gets weird if there are capital letters not in the first character.

@vicwomg
Copy link
Owner

vicwomg commented Feb 12, 2021

Oh my gosh, that's a bug indeed. Updating the title to better match what you're saying

@vicwomg vicwomg changed the title Feature request: Case insensistive song listing Bug: lowercase strings are sorted after uppercase in the browse view Feb 12, 2021
@vicwomg vicwomg added the bug Something isn't working label Feb 12, 2021
@vicwomg vicwomg changed the title Bug: lowercase strings are sorted after uppercase in the browse view Bug: capital letters are sorted before non capital letters in the browse view Feb 12, 2021
@jramboz
Copy link
Contributor

jramboz commented Feb 12, 2021

I think I found the problem. It's in karaoke.py line 453. Try changing:

self.available_songs = sorted(files_grabbed)

to:

self.available_songs = sorted(files_grabbed, key=str.lower)

Thanks to this StackOverflow answer!

@iMelsom
Copy link
Author

iMelsom commented Feb 12, 2021

Yep.
Changing that fixed this for me:)

@vicwomg
Copy link
Owner

vicwomg commented Feb 15, 2021

this is on development branch, will go out with next release

@vicwomg vicwomg closed this as completed Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants