Hi PasTim, That's essentially what I did, but how do you deal with the problem of dynamic playlists truncating the list?
Thanks, Mike PasTim wrote: > Do you use custom scan, and do your 'works' include a 'work' tag? If > so, something like the following should do the job (it does for me). > > > Code: -------------------- > > > -- PlaylistName:Random Classical Works > -- PlaylistGroups:Random > -- PlaylistOption Unlimited:1 > create temporary table sqlplaylist_random_work as > select customscan_track_attributes.extravalue as work, tracks.album as album from customscan_track_attributes > join tracks on > customscan_track_attributes.track = tracks.id > left join dynamicplaylist_history on > tracks.id=dynamicplaylist_history.id and dynamicplaylist_history.client='PlaylistPlayer' > where > customscan_track_attributes.module='mixedtag' and > customscan_track_attributes.attr='WORK' and > dynamicplaylist_history.id is null and > audio=1 > group by customscan_track_attributes.extravalue, tracks.album > order by random() > limit 10; > > select tracks.url from tracks > join customscan_track_attributes on tracks.id = customscan_track_attributes.track > join sqlplaylist_random_work on tracks.album = sqlplaylist_random_work.album > where sqlplaylist_random_work.work = customscan_track_attributes.extravalue and > customscan_track_attributes.module='mixedtag' and > customscan_track_attributes.attr='WORK' and > audio=1 > group by tracks.id > order by tracks.album,tracks.disc,tracks.tracknum; > drop table sqlplaylist_random_work; > -------------------- > > ------------------------------------------------------------------------ mps's Profile: http://forums.slimdevices.com/member.php?userid=36351 View this thread: http://forums.slimdevices.com/showthread.php?t=49483 _______________________________________________ plugins mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/plugins
