More > JRiver Media Center 21 for Windows
Global var issue and musings
vagskal:
Thanks again for the explanation! No offence at all taken. I only meant that this is your thread and your suggestions, and I will not intrude any more by pushing for something other that turned out to have no connection to the issues brought up.
Matt:
I wonder if a new class of expression functions that operate on the set of files would be better than using Save(...) and Load(...) with global variables? Imagine a function to get the average rating, the number of tracks, the total duration, etc. for the current file set. I think we could cover most the needs with a few functions, and they'd be simple to use and be an order of magnitude faster than using string-based variables.
This idea brings back your request to have a way to say 'only run this expression once' instead of 'run this expression once for each file' when building a pane. It would be best if the expression engine could just figure this out automatically so that a use wouldn't have to think about this detail.
Matt:
I wonder what constructs you'd need to categorize into buckets like:
Classic Rock - 600 files - 50 Artists
Folk - 420 files - 37 Artists
etc.
I think the most efficient would be to have two expressions define the category:
Group by: [Genre]
Display: [Genre] - Summary(# Files) - Summary(# Artists)
MrC:
Just jotting down some thoughts...
I know you have some of this stuff stashed away in the Grouping database, so making those values available would certainly be used. Most of the requests are for per-album, per-artist/album artist (auto) stats. Maybe your Summary() function, or Stats(), or (pseudo-)fields such as [duration (total)]. I can see that too many fields become cumbersome. Its not clear to me that there is really much difference between using one or the other other than its availability in the Field pick-list.
Some of the other requests require conditional operations (e.g. if [rating] is not empty, do operation).
For more complicated calculations, my first instinct would be to have an iterator function, which operates on a supplied category list, and applies an expression on the specified properties for the current file. But since the expression language doesn't support lval assignment, math operations, nor an obvious place in the UI to specify such a construct, I'm not sure what it looks like. What would the syntax be for something like the following, and where would be be entered:
result <op> foreach(category list, expression)
duration_total += foreach([album],[album artist (auto)], [duration,0])
The red stuff is what's missing.
Edit: to be clear, this is all very low priority for me personally. I'm happy to provide help where needed to others, and get along just fine with what's available now. So consider this a discussion of needs by proxy.
mark_h:
--- Quote from: Matt on July 08, 2013, 07:46:13 pm ---I wonder if a new class of expression functions that operate on the set of files would be better than using Save(...) and Load(...) with global variables? Imagine a function to get the average rating, the number of tracks, the total duration, etc. for the current file set. I think we could cover most the needs with a few functions, and they'd be simple to use and be an order of magnitude faster than using string-based variables.
--- End quote ---
As long as you don't remove Save() and Load() functionality.... I have about thirty global variables in use throughout MC now (smartlists/user fields/view columns etc) I know we agreed that variables were "temporary" and "could go away" but I cannot live without them...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version