OK, I did something like this, seems to be a good starting point:
select tracks.url from tracks
join tracks_persistent on
tracks.id=tracks_persistent.id
join genre_track on
tracks.id=genre_track.track
join genres on
genre_track.genre=genres.id
left join dynamicplaylist_history on
tracks.id=dynamicplaylist_history.id and
dynamicplaylist_history.client='PlaylistPlayer'
where
audio=1
and dynamicplaylist_history.id is null
and genres.name in ('Mixable')
and ifnull(tracks_persistent.playcount,0)=(select
min(ifnull(playcount,0)) from tracks_persistent)
group by tracks.id
order by rand()
limit 10;
--
amatala
http://www.last.fm/user/amatala
------------------------------------------------------------------------
amatala's Profile: http://forums.slimdevices.com/member.php?userid=15972
View this thread: http://forums.slimdevices.com/showthread.php?t=70617
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins