>Suppose I have 365 albums.  The present random album mix when first
>used plays 1 album randomly from 365 choices.  The second time it is
>used it does the same. i.e., selects 1 album from 365 choices and so on
>with each subsequent use.  Over the course of a year if used once a day,
>as the process is  random, some albums will get played more than once
>and others won't get played at all.  I would like all my albums to be
>played in random order over the year.  So, the random play+ would
>behave as follows.  On first use it would choose an album randomly from
>365, on second use from 364, etc until all albums have been played.  It
>would then reset to make all albums available again.  Just needs an
>extra column in a database and a bit of coding?
>
It would be possible to achieve something equivalent already using Dynamic 
Playlist/SQL Playlist/Trackstat.

You could define a SQL query to select random music from the library where the 
music hasn't been played in the last year.  i.e. TrackStat remembers the "last 
played" time, so select music where last played is less than today - 1 year (or 
has never been played).

Then you make a SQL Playlist based on that query, ordered by random, and 
Dynamic Playlist would play music from that SQL Playlist.

I haven't tried it, but something like:

SELECT *
FROM tracks t
LEFT JOIN track_statistics ts ON t.url = ts.url
WHERE ts.lastPlayed IS NULL OR FROM_UNIXTIME(ts.lastPlayed) < 
ADDDATE(CURDATE(), INTERVAL -1 YEAR)

will get a list of tracks that haven't been played this year.

Should be quite easy to create a SQL Playlist from a template, eg Random Music, 
and then edit the SQL to encorporate the above.

That works for random songs; some further thought would be necessary for random 
albums.  Does playing a single song from an album within a year mean that the 
album shouldn't be considered for random play?  Or exclude albums only if all 
songs have been played this year.  Or, would it play the album, but skip songs 
already played this year?

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

Reply via email to