INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Random Year Smartlist  (Read 931 times)

c1c9k72

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 332
  • So many worlds, so much to do, so little done...
Random Year Smartlist
« 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.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Random Year Smartlist
« Reply #1 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.
Logged
The opinions I express represent my own folly.

c1c9k72

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 332
  • So many worlds, so much to do, so little done...
Re: Random Year Smartlist
« Reply #2 on: April 08, 2012, 07:28:52 am »

That did it!  Thank you very much.

Logged
Pages: [1]   Go Up