greater than not doing what I expected

Caleb Cushing xenoterracide at gmail.com
Fri Apr 25 00:40:24 UTC 2008


On Thursday 24 April 2008 07:06:42 pm Gudlaugur Johannesson wrote:
> If I understand the filter system correctly, which I am not sure of, a song
> is selected if
> (Rating > 2.5 || Score > 65 || Playcount == 0) && Artist != "John Williams"
> && Artist != "Metallica" && Rating > 2.5.
>
> With these, you are excluding all songs that have rating less than 2.5.  My
> guess is that you want to do
> (Rating > 2.5 || Score > 65 || Playcount == 0) && Artist != "John Williams"
> && Artist != "Metallica" && (Rating > 2.5 || Not Rated)

I THINK this does what I want. I'm haven't done a lot of subqueries (if any) 
and so I'm having problems writing it into a test. (and I think you 
understand me, but since I can't test your code it's kinda hard to say). (I 
excluded metallica and john williams code because it's not really relevant to 
the issue)

 SELECT tags.title,
        artist.name,
        statistics.rating,
        statistics.playcounter,
        statistics.percentage -- score
   FROM statistics -- tags -- artist
        INNER JOIN tags
                ON tags.url = statistics.url
        INNER JOIN artist
                ON artist.id = tags.artist
  WHERE  statistics.percentage >= 70 OR
         statistics.playcounter = 0
         AND
         (statistics.rating >= 6 OR
         statistics.rating = 0);

> This is not possible and I guess the developers will have a hard time
> implementing this kind of flexibility in a nice understandable interface.
>
> What you can do instead, is to have two smart playlists and a dynamic
> playlist that selects from those.
>
> The first one would be to select all songs rated above 2.5.
> The second one would be
> (Score > 65 || Playcount == 0) && Not Rated
>
> To have consistency with the artists, you would have to exclude them from
> both playlist.
>
> This is not optimal, but should work.

I'll give the 2 playlist thing a try.

> The problem here is that you generally don't want to exclude non-rated
> songs when filtering on rating.  A possible fix is to have a default rating
> of 5 rather than the current default of 0.  Or even an option Rating,
> excluding non rated or something like that.  Shouldn't be to hard to code,
> although I am not volunteering for it.

non-rated Item's should probably contain a NULL value, instead of a 0.

-- 
Caleb Cushing

my blog http://xenoterracide.blogspot.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/amarok/attachments/20080424/776069b0/attachment.sig>


More information about the Amarok mailing list