INTERACT FORUM

Please login or register.

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

Author Topic: using 'and' and 'or' for setting rules for display  (Read 1492 times)

jgp5775

  • Recent member
  • *
  • Posts: 16
using 'and' and 'or' for setting rules for display
« on: July 15, 2020, 10:53:22 am »

Can anyone please help me ? I have tried using the parentheses for adding additional rules for display but apparently I am doing it wrong. I have not found a video for it as that would make it pretty easy to follow. If you do explain it please remember I am new to MC. For example if i want 24-192 files but only cds not vinyl how would the rules setup look?
Basically any setup where you have more than one rule is what I cannot seem to figure out. I have read other posts but none so far have explained it clear enough for a newbie.thank you ahead of time  :)
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: using 'and' and 'or' for setting rules for display
« Reply #1 on: July 15, 2020, 12:28:22 pm »

There's no video that directly addresses your question.

I suggest you look at the following wiki articles:
https://wiki.jriver.com/index.php/Search_Wizard
https://wiki.jriver.com/index.php/Search_Language

These describe in detail how to use the search language, and the search wizard.  When you use the wizard, by default all rules are required to be matched, so it is a logical AND for every rule you create.  It is therefore trivially easy to require two criteria, as long as the information is provided in tags.  Do you have a tag that indicates something is "vinyl"?

You can create search rules using the wizard, or by inputting the rules as text using the "import/export" button in the search wizard.  A rule that requires only classical music with sample rate of 192k would look like this:
[Sample Rate]=192000 [Genre]=[Classical]

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.

There are a few tutorial videos available, that will help someone new to MC.  Look here:
https://yabb.jriver.com/interact/index.php/topic,111775.0.html

I suggest you especially look at video 8 "Creating Views" because about halfway through it gives several examples of using the search wizard to add rules in the creation of a view.  The use of the search wizard is the same whether you are creating a view, editing set rules for file display, or simply searching from the search box.

Logged

jgp5775

  • Recent member
  • *
  • Posts: 16
Re: using 'and' and 'or' for setting rules for display
« Reply #2 on: July 15, 2020, 01:38:11 pm »

thank you . yes i found the hard to find () and [] but I must not be using them properly.  i will watch the video again ,thanks
Logged

jgp5775

  • Recent member
  • *
  • Posts: 16
Re: using 'and' and 'or' for setting rules for display
« Reply #3 on: July 15, 2020, 01:44:44 pm »

And unfortunately the video example never adds more than one rule. I can do the one rule no problem but run into problems when having more than one rule. Yes I am aware of the that the tags need to have the info as well. Every time I add a second rule ,the second rule basically cancels the first rule so clearly there is something else  I am not doing that I should.
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: using 'and' and 'or' for setting rules for display
« Reply #4 on: July 15, 2020, 02:35:54 pm »

I'm guessing you didn't watch the video all the way through, because it does add more than one rule. Every row is a rule.

If you want to provide an example of EXACTLY what you want, not a hypothetical one, I can try and help you.  If you're using made up criteria like "vinyl" provide the tags that contain that info.

As I indicated previously, you do not need any special modifiers to combine rules in an AND manner.

You might also provide a screenshot of the search dialog that shows the progress you've made on the rules so far.
Logged

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3119
Re: using 'and' and 'or' for setting rules for display
« Reply #5 on: July 15, 2020, 02:49:29 pm »

Let's look at your example and how I do it.  You need 3 fields and 3 rules for [Bit Depth], [Sample Rate], and [Audio Media]. The first 2 are standard fields, but the third one needs to be a custom tag that you create since there is no standard tag that contains that information. It would be a non-relational string and have values limited to certain values that you add,  like CD, DVD-Audio, Vinyl, Download, that identify the source of the track.

The first 2 rules are numerical fields, so the rule is equal to, greater than, less than, etc.  The third rule would use Is  and you select the values you want from the drop down, like DVD-Audio and Download, but do not include vinyl. So, you end up with 3 and rules. No or rules needed.

Bit Depth is 24

Sample Rate is 192

Audio Media is DVD-Audio;Download   (selected from dropdown list)


Alternatively, the third rule could be set to Is Not Vinyl if you wanted to include everything but vinyl.


Another way I use to identify digitized vinyl is to store them all in a folder called Vinyl and then use a rule that Filename (Path) Contains Vinyl or Filename (Path) Does Not Contain Vinyl.  That way you do not have to maintain the custom field, but it does mean you have to store your digitized vinyl in a specific folder.


Hope that does what you want.
Logged

jgp5775

  • Recent member
  • *
  • Posts: 16
Re: using 'and' and 'or' for setting rules for display
« Reply #6 on: July 15, 2020, 03:01:49 pm »

Thanks...the problem was adding rules without using parentheses or brackets the " and " "or" thing.I think I finally got it to work by adding the the brackets around each additional rule. I may also try your suggestion of file path too. thank you
Logged

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3119
Re: using 'and' and 'or' for setting rules for display
« Reply #7 on: July 15, 2020, 03:39:42 pm »

Glad you figured it out. You should not have to use () or [] or "or" to do this.
Logged

jgp5775

  • Recent member
  • *
  • Posts: 16
Re: using 'and' and 'or' for setting rules for display
« Reply #8 on: July 15, 2020, 05:01:51 pm »

lol I spoke too soon. I thought i had it but ya still problems . So here is one scenario with at least 3 rules I tried but what I want is additional rules and for some reason the added rules I put in will at times eliminate one of the other rules.  First rule ; bit depth is 24
                                                                                    second rule; sample rate is 192000
                                                                                    third rule ; album contains vinyl   ( some of my folders have vinyl in the file folder but not all.)
                                                                                    fourth rule; file path contains vinyl    ( for all the folders that do not have vinyl as a folder name)
Am I incorrect in assuming that when I add the fourth rule , I should get more albums to show since I know that many have "vinyl" in the file path name?
But the opposite has been the case when adding rules . Instead of more albums showing it is often less after adding more rules

Logged

BigSpider

  • Galactic Citizen
  • ****
  • Posts: 352
Re: using 'and' and 'or' for setting rules for display
« Reply #9 on: July 15, 2020, 05:19:24 pm »

If you AND the third and fourth rules it will only show those albums with vinyl in their name AND have vinyl in the filepath. You would need to OR these two rules so that you get those with vinyl in the album name and also those with vinyl in the filepath. You would need to enclose these two rules with a { at the start and a } at the end.
Logged
English spiders are kind of small, but when I was living in the African rain forest well ......

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: using 'and' and 'or' for setting rules for display
« Reply #10 on: July 15, 2020, 05:25:19 pm »

So what you seem to mean is 1 AND 2 AND (3 OR 4).

Paste this in through the import/export button in the search wizard dialog, and try to understand how it works.

[Bit Depth]=24 [Sample Rate]=192000 ([Album]="vinyl" or [Filename (path)]="vinyl")
Logged

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3119
Re: using 'and' and 'or' for setting rules for display
« Reply #11 on: July 15, 2020, 06:10:48 pm »

The 4 rules by themselves are all treated as AND.  Your 3rd and 4th rules can be mutually exclusive so need an OR.  To just use ANDs you need either all the albums to be in a vinyl folder or to have a field with Vinyl in it for all vinyl albums.  Maintaining a separate field takes more effort, but I find it the most flexible, since you can use it for several audio sources.  I would keep Vinyl out of the album name, since it makes cover art lookup hard.

wer's expression should work fine but a consistent treatment of digitized vinyl tracks will simply things going forward.
Logged

jgp5775

  • Recent member
  • *
  • Posts: 16
Re: using 'and' and 'or' for setting rules for display
« Reply #12 on: July 15, 2020, 07:18:38 pm »

thank you
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: using 'and' and 'or' for setting rules for display
« Reply #13 on: July 15, 2020, 10:01:59 pm »

Glad you've got it figured out...
Logged
Pages: [1]   Go Up