INTERACT FORUM

More => Old Versions => Media Center 17 => Topic started by: c1c9k72 on April 07, 2012, 06:51:38 pm

Title: Random Year Smartlist
Post by: c1c9k72 on April 07, 2012, 06:51:38 pm
This is probably a foolish question, but I can't seem to figure it out.  I want to create a smartlist that picks a random year (for my purposes, this is between 1930 and 1963) and will only populate the list with media from that year.  Using what I learned from the Wiki, I guessed that the best way to go about this is:

Year is Math(1930+Rand(33))

Instead, I get this in the Edit Smartlist box.

Year is Math
Custom 1930+Rand(
Custom 33]]

Is what I'm trying to do possible?  Any help would be greatly appreciated.
Title: Re: Random Year Smartlist
Post by: MrC on April 07, 2012, 11:15:09 pm
An expression w/Math and Rand() won't work, since a random number will be generated for each and every track.  You're hoping for one random number generated, and then all tracks matched against that.

Instead, you want to use the built-in smartlist search and modifier operations.

   [Media Type]=[Audio] [Date (year)]=1930-1963 ~limit=1,-1,[Year] ~sort=Random

You can use the search/smartlist wizard to build these.  This one says, select only Audio, the Year must be within your range of 1930-1963, limit to only 1 year with all files (-1) from that year, and sort randomly.
Title: Re: Random Year Smartlist
Post by: c1c9k72 on April 08, 2012, 07:28:52 am
That did it!  Thank you very much.