Page 1 of 1

Advanced filter expression builder -- Problem with test results

Posted: 22 Apr 2020 18:11
by fred48fm
Hi,

In the script editor -> advanced editor, if i try something like :

Code: Select all

Genre - Begin with - MYGENRE
-> The test button result show no match. But if i just click OK and get back to the builder, with same code, no changes, i got the results.
builder-nok.png
builder-ok.png
In the same topic, i falled back to an old builder (not advanced).
I got into it by removing the ~ in filter text field.
notadvanced.png
In this one the expression generated is totally different.
In my test : ~StartsWith([Genre], 'Mond') And [Rating] >= '40' looks to be e:Mond + r:40
Are both version interpreted the same by PF ?

Best regards

Re: Advanced filter expression builder -- Problem with test results

Posted: 22 Apr 2020 21:29
by radio42
I cannot reproduce these issues resp. they might work as designed.

In the first two screenshots you can see, that you are testing against 2 different MediaLibs:
a) /LATINO
b) /MONDE
You probably have not specified a single MediaLib in the related script-line, but multiple, e.g. using AND OF.
In that case, with each test, first a random media lib will be selected (like during the normal scripting execution) and then the filter is applied.
Thus for the MediaLib /LATINO no matching track is found; but for the MediaLib /MONDE some tracks are matching.

Whenever a Filter String is starting with an '~' or '^' sign, the advanced filter is opened; else the simplified filter opens.
You probably have (maybe accidentally) edited the Filter String and removed the leading '~' sign manually.
Thus, the simplified filter opens and interprets the given text as a title text.
If you DO not manually edit the Filter Text, all is fine.
Thus your examples are of course not the same!
"e:Mond + r:40" would mean "Genre contains Mond AND Rating>=40"

Re: Advanced filter expression builder -- Problem with test results

Posted: 23 Apr 2020 15:19
by fred48fm
Thank you for your answer.

As this behavior is not specified, i interpreted it as an error.
But, you're totaly correct, the error comes from the fact the test check one library at a time.

Best regards

Re: Advanced filter expression builder -- Problem with test results

Posted: 23 Apr 2020 16:42
by radio42
Well, it is specified, as just written above.
But it might not be what you expected.
Thus there is no error, but infact the reason, why in the test screen I explicitly SHOW the MediaLib which is being tested !