More > JRiver Media Center 25 for Windows

List Combining [Last Played] and [Number Plays]

(1/2) > >>

andrewberg:
For a playlist to include files a) never played, and b) not played for 1 year (or more), I have tried to combine fields using this rule:


--- Code: ---[Number Plays]=<1 [Last Played]=>1y
--- End code ---

But these cancel out each other, because a file played (at least once) has no longer a value for [Last Played]...

So, I change the number of plays value to anything higher than 0:


--- Code: ---[Number Plays]=<2 [Last Played]=>1y
--- End code ---

This however wil exclude files that were played more than once... (And of course, a higher number will exclude files that were never played...)

Is there no way to include BOTH files that were never played AND those not played for 1 year? Thanks for your ideas!

wer:
The search language uses boolean operators. You're thinking in terms of "and" but that's a misunderstanding of how boolean operators work.

What you need to do is "OR" your first two search terms.  An OR gives you the full results of two searches, whereas an AND gives you the results of the union, meaning only where both searches are true.

See the Grouping and Combining section of the search language wiki article:
https://wiki.jriver.com/index.php/Search_Language

andrewberg:

--- Quote from: wer on March 11, 2021, 04:26:34 pm ---The search language uses boolean operators. (...) What you need to do is "OR" your first two search terms.  An OR gives you the full results of two searches, whereas an AND gives you the results of the union, meaning only where both searches are true.
--- End quote ---


Wow, thank you! I had heard of Boolean operators before, but often wondered if they work in MC at all... So my search expression is now:


--- Code: ---([Last Played]=>1y or [Number Plays]=[])
--- End code ---

... results are exactly as desired! That was very instructive, wish I had asked before... going to use this extensively -- thanks again! ;-)

wer:
Good, that's exactly right.

You were typing in search terms, and that's the way to use it there, but for anyone else looking I'll also give you a tip: it is also possible to use boolean operators and grouping when using the search wizard to build your rules.  The Wizard ANDs all rules by default.  But to quote myself from an old post:

--- Quote ---You can also use parenthesis within the search wizard, but this feature is so hidden and undocumented it could be considered a prank.  If you hover your mouse in a secret area immediately to the left or right of a rule, you will see a tooltip appear telling you to use '(' to -OR- rules or '[' to -AND- rules by clicking.
--- End quote ---

andrewberg:

--- Quote from: wer on March 11, 2021, 04:56:23 pm ---(...) "You can also use parenthesis within the search wizard, but this feature is so hidden and undocumented it could be considered a prank.  If you hover your mouse in a secret area immediately to the left or right of a rule, you will see a tooltip appear telling you to use '(' to -OR- rules or '[' to -AND- rules by clicking."
--- End quote ---

Wow, a true Easter Egg, well hidden at the far edges of search rule boxes -- not where you normally point your mouse... With each click adding different braces to the rule -- nice feature, only needs a button to make it more accessible... ;-)

Edit: The tooltip is badly mistranslated (German), I will contact the translator to get that fixed, so at least the accidental mouse hover shows useable information... ;-)

Navigation

[0] Message Index

[#] Next page

Go to full version