One of the things missing in 'vanilla' MC is the ability to EXPAND (ignoring Expand to Full Album) results based on subset of results.
You can use Playlist 'IS ANY' or Playlist 'IS ALL' but these LIMIT results to the subset. They cannot be used to EXPAND.
For example, say you have a sublist that returns a single random artist and then you want to expand the results to list ALL albums by the artist.
sublist:
~sort=Random ~n=1Until variables were added, you could not.
But with variables this is now possible, eg:
(([Media Type]=[audio] [=save(0,v_filter[artist])1]=1) or (playlistid==sublist* [=save(1,v_filter[artist])1]=1)) [=load(v_filter[artist])]=1 ~nodup=[Album],[Artist] ~sort=[Artist]*reference the sublist above here
This will EXPAND the 'sublist' to show ALL albums by [artist]
Note the use of the variable v_filter[artist]
The steps are:
Set v_filter[artist] to 0 for all database entries - ie unflag every entry in the database
Run the sublist and set v_filter[artist] to 1 for all entries found - ie flag any matching entries in the sublist
Output all entries that have v_filter[artist] set to 1 - ie output any entries that match the variable filter
It's the last step that does the expansion. The [artist] has been captured from the sublist in v_filter and now all [artist] entries will match the variable.
If you now change sublist to somethiing like:
~sort=Random ~nodup=[Album],[Artist] ~n=3You will get a sublist set containing just three random artists
And the code above will now EXPAND the result to all their albums.
So far, so what?
Well, what if you wanted to do something more interesting? eg,
The sublist now returns 3 random artist entries and you want to EXPAND to show ALL entries from the same YEAR as those in the sublist, regardless of [artist]
Simply change the v_filter[artist] to v_filter[year] and you now get the sublist EXPANDED to include all matching years...
This framework allows you to fundamentally EXPAND upon the way MC's simple file based approach works. You can set v_filter up to capture anything you like from the sublist and expand the results into a superset.
So, the basic framework is:
(([Media Type]=[audio] [=save(0,v_filter[artist])1]=1) or (playlistid==sublist* [=save(1,v_filter[artist])1]=1)) [=load(v_filter[artist])]=1* = your sublist
And by changing v_filter and/or adding further rules you can EXPAND(!) upon this as needed.
Enjoy!