Try if something like this works in SQL Playlist:

Code:
--------------------
    
  -- PlaylistName:Random songs between years
  -- PlaylistGroups:Random/For selected
  -- PlaylistParameter1:year:Select first year:
  -- PlaylistParameter2:year:Select second year:
  select tracks.url from tracks
        left join dynamicplaylist_history on
                tracks.id=dynamicplaylist_history.id
        where
                audio=1
                and tracks.year>='PlaylistParameter1'
                and tracks.year<='PlaylistParameter2'
                and dynamicplaylist_history.id is null
        order by rand()
        limit 10;
  
--------------------


I haven't tried it myself, but the difference from the "Random songs
from year" playlist available as default is:
- I've added the "PlaylistParameter2:year:Select second year:" row
- I've changed the query part to:

Code:
--------------------
    
  and tracks.year>='PlaylistParameter1'
  and tracks.year<='PlaylistParameter2'
  
--------------------


It will be possible to launch from a "Year" by holding play down and
selecting the "Dynamic Playlist" mixer, you will then have to manually
select the second year. You can of course also launch it from "Dynamic
Playlists/Random/For selected" menu and enter both years manually.

It's possible to make it more advanced so you can't select an earlier
year as the second parameter but I thought it was better to make it
simple to start with.


-- 
erland

Erland Isaksson
'My homepage' (http://erland.isaksson.info) (Install my plugins through
Extension Downloader)
(Developer of 'TrackStat, SQLPlayList, DynamicPlayList, Custom Browse,
Custom Scan,  Custom Skip, Multi Library, Title Switcher and Database
Query plugins'
(http://wiki.erland.isaksson.info/index.php/Category:SlimServer))
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
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