We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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?
to your account
Original issue 1352 created by danielkza2 on 2014-03-20T03:11:09.000Z:
Quodlibet version: 3.0.99 from Fedora 20 unstable repo.
Albums with a total rating of 0.0 (I noticed because I have lots of unrated albums and set the default rating to 0) sort before everything else in the Album List browser.
This is caused by a mistake in the sorting function in quodlibet/browsers/albums/main.py:
def __compare_rating(self, model, i2, i1, data):
a1, a2 = model.get_value(i1, 0), model.get_value(i2, 0)
if (a1 and a2) is None:
return cmp(a1, a2)
return (cmpa(a1("~#rating"), a2("~#rating")) or
cmpa(a1.date, a2.date) or
cmpa(a1.sort, a2.sort) or
Notice the use of cmpa for the rating: it causes the 'falsy' value of 0 to be treated as infinity, and therefore sort before everything else. I believe plain cmp should be used instead.
The text was updated successfully, but these errors were encountered:
Comment #1 originally posted by reiter.christoph on 2014-03-20T07:16:46.000Z:
Sorry, something went wrong.
Comment #2 originally posted by reiter.christoph on 2014-03-20T13:20:25.000Z:
This issue was closed by revision 218115b.
Comment #3 originally posted by reiter.christoph on 2014-03-20T13:22:49.000Z:
Thanks, should be in the fedo repo in a few minutes.
Comment #4 originally posted by reiter.christoph on 2014-04-01T11:49:01.000Z:
This issue was closed by revision bbdc1d3.
No branches or pull requests