Version: pre 2.0 beta (using Devel) OS: Linux Installed from: Compiled sources 0 is used to denote a unrated tracks. NULL should be used as null is not less than a rating of 5. this causes serious problems when creating playlists that basically asking for values greater than anything.
I don't understand what you are saying. Can you please provide an example?
when tracks are added to the database their rating is 0 it should be NULL. if I tell amarok to not play tracks rated less than 2 it won't play anything I haven't rated either. because the database sees 0 as less than 2. even though not rated is the same as saying we don't have a rating or don't have any information on a rating. null is the proper value for when you don't have information on something. this problem has been present for several years.
*** Bug 174593 has been marked as a duplicate of this bug. ***
This is because "rating" and score are variables (integer between 0-10, and float between 0-100 respectively) internally. Unrated songs do actually have a rating of 0 and the lowest rating you can assign to a song is 1 (0.5 stars). The other option is perhaps have amarok assign an initial rating of 5 (2.5 stars) to all songs, which might not be such a good idea...For now, you could exclude songs between 0.5 and 2 stars and that will work...
that wouldn't work as the query would still see it as less than. you're proposing a 'hack' and not in a good way, the fix is to use nulls.
A 'null' wouldn't have any relationship with > or < some number of stars. If we take the SQL meaning it would always be false and never be selected by any star selection. Semantics asside it might be nice to list unrated tracks as unrated, and have an option on dynamic playlists to include unrated tracks.
To clarify my last remark, I mean to allow a selection like 5 star and unrated tracks; which is, I think, a reasonable use case.
You are welcome to give a hand :) Source code is on Gitorious: http://gitorious.org/amarok
I haven't worked much with kdelibs/qt and I'm pretty swamped with work, but I'll take a look sometime between now and Sunday.