I've got a few playlists defined in the excellent SQLPlayList plugin. 

For example:

> SELECT t.url /*, t.title, g.name, t.playCount, t.rating */
> FROM tracks t
> LEFT JOIN genre_track gt ON t.id = gt.track
> LEFT JOIN genres g ON gt.genre = g.id
> WHERE g.name NOT IN ('Classical','Books &
> Spoken','Podcast','Podcasts','Religious','Musicals')
> AND g.name is not null
> AND (t.rating is null OR t.rating > 20)
> ORDER by random() limit 10;
I'd like to pick the community's brains about how to emulate the iTunes
Party Shuffle "play higher rated songs more often" feature. 

This feature allows you to set a value (via a slider) that biases the
randomness of the Party Shuffle in favour of songs with a higher rating
value.

I realise this is more of a mathematical algorithm and SQL programming
question (rather than than a plugin/slimserver one) but I'd be
interested to hear if others have any suggestions about how to bias
randomness in a SQL query.

Thanks.


-- 
barcar
------------------------------------------------------------------------
barcar's Profile: http://forums.slimdevices.com/member.php?userid=1760
View this thread: http://forums.slimdevices.com/showthread.php?t=24692

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to