More > JRiver Media Center 20 for Windows
Examples of the new LOAD and SAVE functions?
MrC:
Probably the field/GV is not evaluated until necessary. You can test for it in the Set Rules for File Display. That will cause an evaluation.
If it is a user field, just test that the field is not empty to include those files. Or if it is not a field or to force evaluation, you can use something like:
[=save(value,variable)1]=1
as a Custom Rule in Set Rules for File Display. Note the forced 1 after the paren so that the Search returns TRUE always.
mark_h:
--- Quote from: rick.ca on April 26, 2012, 03:36:00 pm ---I meant determine the random week mathematically and Save() the result.
--- End quote ---
Again, AFAIK it cannot be done within ONE smartlist because that calculation will be carried out by ALL other tracks in the smartlist and will come up with a different answer OR the answer won't be available for further rules to consider in time. I'll take a look today as I might have an idea that can be tried...
mark_h:
--- Quote from: MrC on April 27, 2012, 01:37:04 am ---Probably the field/GV is not evaluated until necessary.
--- End quote ---
Yeah, there's definitely some rule here to understand.
While smartlists get evaluated each time you run them, variables only seem to be refreshed if they are part of the view.
Just tested the above and that's not true.
More experimenting today.
mark_h:
--- Quote from: MrC on April 27, 2012, 01:37:04 am ---If it is a user field, just test that the field is not empty to include those files. Or if it is not a field or to force evaluation, you can use something like:
[=save(value,variable)1]=1
--- End quote ---
This has provided the key for refreshing! BUT, it only works with another level of smartlists, so I now have:
seed list - this pulls ONE entry from which to take the chart week
intermediate list - calls the seed list and creates the variable based on the chart week
final list - calls the intermediate to recover the new variable and display results.
if the final list calls only the seed list the variable is not refreshed because there is no sorting to the database applied and so the first value is always selected, resulting in the same chart week every time. Rick's suggestion of calculating a starting week may be able to remove the intermediate list.
mark_h:
The problem with not being able to use one seed list is related to the way smartlists are processed:
Ideally I would use a scheme like:
[Media Type]=[Audio] ~sort=Random ~n=1 [=save([chart entry],VarChartEntry)1]=1
This would pick ONE random track from my audio collection and create a variable based on that tracks [chart entry].
But because of the way the smartlist parser works it reorganises the above to:
[Media Type]=[Audio] [=save([chart entry],VarChartEntry)1]=1 ~sort=Random ~n=1
Which has the effect of always selecting the same [chart entry] for the variable AND THEN restricts the results to one random entry, but the variable is already set...
I'm guessing there are plenty of situations where order is critical to the success of our smartlists and this enforced order creates situations that require workarounds. It would be nice if we had full control over the order of the smartlist processing...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version