fossfreedom / coverart-browser

Browse your cover-art albums in Rhythmbox v2.96 - 3.0+
http://xpressubuntu.wordpress.com/
GNU General Public License v3.0
74 stars 19 forks source link

Bug or enhancement? - Unicode characters confuse sorting #125

Closed fossfreedom closed 11 years ago

fossfreedom commented 11 years ago

from #122

"-> It seems that in the algorithm classing albums by alphabetical order there is a difference between capitals and lower case. This I think should be corrected. That is why at the end of my album list, I have all the albums that start with a lower case. There is also a difference between "é" and "e" so for me "É" is at the end after a "Y". I don't know if this last problem is easy to fix."

Looks like the unicode characters are confusing the sorts here.

Do we classify this as a bug (fix on master or refactor) or as an enhancement on a future milestone?

This Q&A may help:

Alternatively - maybe (but complicated?) - have separate display "album names and artists" - but for sorting we hold album names and artists with the unicode replaced with ascii equivalents i.e. e (accent) replaced by "e" (unicode.decode function?)

EDIT: Will have a look in a separate branch - I share the concern that this may severely impact performance

fossfreedom commented 11 years ago

@asermax - ok on the sortfilter branch I've made some changes to just coverart_album

Basically use the Rhythmbox function used to convert to "search text" - n.b. this strips unicode and converts to lower case and ascii equivalents.

Now the search box can search for stuff like "Celine Dion" and accented stuff like "Céline Dion". The sort order also ignores accents in the sort order.

Any performance issues in your vast collection with these changes?

asermax commented 11 years ago

Seems to be working alright :3 saving the folded name and artist for future use is pretty wise, probably if we would calculate it each time may cause some delays. Hmm the only thing, I don't think they should be cleared when the album gets modified; neither the name nor the artists for the album can be modified, hence the folded name and artist wouldn't change either (remember that an album's identity is given by it's name and artist).

fossfreedom commented 11 years ago

cheers :)

jrbastien commented 11 years ago

I was also impacted by this problem given I have quite a few albums in French, so thank you for this. However, it no longer retrieves albums with various artists.

For instance, if I search for "mes aieux" or "Mes Aïeux", it only retrieves the albums from this band. It used to show me also 2 extra compilation albums where they play a track on each.

fossfreedom commented 11 years ago

@jrbastien - any chance you can email me the track/tracks in question so that I can see what the issue is?

fossfreedom commented 11 years ago

@jrbastien - ok - I think I see the issue. Can you try the "tracksearch" branch (git clone .... -b tracksearch) ?

Let me know if this resolves this matter?

asermax commented 11 years ago

@fossfredom you can do RB.search_fold(self.artists) instead of retrieving all the artists again, I think the result would be the same.

fossfreedom commented 11 years ago

@asermax - looks like you are correct (at least in my test) :+1:

jrbastien commented 11 years ago

OK, I have tested the tracksearch branch and I can confirm that it is now working as before. And it ignores the unicode characters which is great.