After looking through my playlists and the samples, I think i worked out
a solution. I already had a "Not played in years" type playlist.

With this one,I can select the artist, then it shows my all the years
that artist has tracks. I select the first year, then the second year
that is later than the first.

Thanks for your help.


Code:
--------------------
    
  -- PlaylistName:Random songs by artist from Selected Years
  -- PlaylistGroups:Random/For selected
  -- PlaylistParameter1:artist:Select artist:
  -- PlaylistParameter2:custom:Select 1st Year:select tracks.year,tracks.year 
from tracks join contributor_track on tracks.id=contributor_track.track and 
  
  contributor_track.contributor='PlaylistParameter1' where tracks.audio=1 group 
by tracks.year order by tracks.year
  -- PlaylistParameter3:custom:Select 2nd Year:select tracks.year,tracks.year 
from tracks join contributor_track on tracks.id=contributor_track.track and 
  
  contributor_track.contributor='PlaylistParameter1' where 
tracks.year>='PlaylistParameter2' and tracks.audio=1 group by tracks.year order 
by tracks.year
  select tracks.url from tracks
        join contributor_track on
                tracks.id=contributor_track.track and
                contributor_track.contributor='PlaylistParameter1'
        left join dynamicplaylist_history on
                tracks.id=dynamicplaylist_history.id
        where
                audio=1
                and tracks.year>='PlaylistParameter2'
                and tracks.year<='PlaylistParameter3'
                and dynamicplaylist_history.id is null
        group by tracks.id
        order by rand()
        limit 10;
  
--------------------


-- 
OneHitWonder
------------------------------------------------------------------------
OneHitWonder's Profile: http://forums.slimdevices.com/member.php?userid=31809
View this thread: http://forums.slimdevices.com/showthread.php?t=65850

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

Reply via email to