Bug tracking
» Click here to report a bug on this project.
| Bug report #530 | |||
| Title: | Artist list should not be case sensitive | ||
| Date added: | 2009-02-16 21:53:43 | Type: | Bug report |
| Status: | Resolved | Priority: | Normal |
| Affected version: | trunk | Milestone: | n/a |
| Reported by: | strider | Assigned to: | xbright |
| History: |
|
Attachements: |
|
|
On the artist list the names starting with an upper case character appear first then the one starting with lower case.
The sorting method should be case insensitive |
|||
| Re: Artist list should not be case sensitive - 2009-02-17 20:44:30 | |
|
|
Et voila ^^
The same operation has to be done in normal.py and basic.py Index: full.py =================================================================== --- full.py (revision 90) +++ full.py (working copy) @@ -126,6 +126,15 @@ def insert_artists(self, pbar, treestore, force_scan): """This function is called at the start-up and add artists.""" + def artist_sort(x, y): + """This function sorts songs.""" + if x[0].lower() == y[0].lower(): + return 0 + elif x[0].lower() < y[0].lower(): + return -1 + else: + return 1 + threads_enter() # Call database @@ -141,7 +150,7 @@ pbar.set_text(_('Loading artists…')) items = self.songs_tree.items() - items.sort() + items.sort(artist_sort) items_sort = [key for key, value in items] treestore.clear() |
| Re: Artist list should not be case sensitive - 2009-02-17 20:47:57 | |
|
|
Of course the comment should read : """This function sorts artists.""" =P
|
| Re: Artist list should not be case sensitive - 2009-02-21 13:11:20 | |
|
|
Thanks for the patch, fixed in r93.
|
| This bug is closed. |
Bluemindo

