Hi,
I have been using Erlands fantastic plugins for a while now and on
SLimserver 6.5 all was running fine. I've upgraded to 7.2 (official -
not nightly), and upgraded all the plugins as required.
My favourite SQL PLaylist was for Randon songs with no Xmas music but
with limited ratings. I used to let it pick 70% rating 4 - 5 and 30%
less than this.
Now Unless I have had total brain failure this playlist would also pick
songs that were not rated (ie rated 0) in that 30% group - thus letting
me hear tracks that I hadn't rated and could do so on the fly.
This behaviour seems to have stopped! Below is the SQL:
Code:
--------------------
-- PlaylistName:Random songs Limited Rating (no Xmas)
-- PlaylistGroups:
create temporary table randomweightedratingslow select tracks.url from tracks
left join dynamicplaylist_history on
tracks.id=dynamicplaylist_history.id
left join track_statistics on
tracks.url=track_statistics.url
where
audio=1
and track_statistics.rating<80
and dynamicplaylist_history.id is null
and not exists (select * from tracks t2,genre_track,genres
where
t2.id=tracks.id and
tracks.id=genre_track.track and
genre_track.genre=genres.id and
genres.name in
('Holiday'))
order by rand()
limit 30;
create temporary table randomweightedratingshigh select tracks.url from tracks
left join dynamicplaylist_history on
tracks.id=dynamicplaylist_history.id
left join track_statistics on
tracks.url=track_statistics.url
where
audio=1
and track_statistics.rating>=80
and dynamicplaylist_history.id is null
and not exists (select * from tracks t2,genre_track,genres
where
t2.id=tracks.id and
tracks.id=genre_track.track and
genre_track.genre=genres.id and
genres.name in
('Holiday'))
order by rand()
limit 70;
create temporary table randomweightedratingscombined as
SELECT * FROM randomweightedratingslow
UNION
SELECT * from randomweightedratingshigh;
SELECT * from randomweightedratingscombined
ORDER BY rand()
limit 10;
DROP TABLE randomweightedratingshigh;
DROP TABLE randomweightedratingslow;
DROP TABLE randomweightedratingscombined;
--------------------
This is the same code that I -believe- to have been working as
described on 6.5!
Any advice greatly appreciated!
Nic
--
DrNic
SqueezeCenter Version: 7.2 - 22900 - Debian - EN - utf8
Perl Version: 5.8.8 i486-linux-gnu-thread-multi
MySQL Version: 5.0.51a-3ubuntu5.1
Platform Architecture: i686-linux
------------------------------------------------------------------------
DrNic's Profile: http://forums.slimdevices.com/member.php?userid=92
View this thread: http://forums.slimdevices.com/showthread.php?t=53251
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins