Advanced filter expression builder -- Problem with test results

You found a bug or have any issues? Please post them here!
Post Reply
fred48fm
Posts: 55
Joined: 28 Aug 2019 09:52

Advanced filter expression builder -- Problem with test results

Post by fred48fm » 22 Apr 2020 18:11

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

User avatar
radio42
Site Admin
Posts: 6373
Joined: 05 Apr 2012 16:26

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

Post by radio42 » 22 Apr 2020 21:29

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"

fred48fm
Posts: 55
Joined: 28 Aug 2019 09:52

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

Post by fred48fm » 23 Apr 2020 15:19

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

User avatar
radio42
Site Admin
Posts: 6373
Joined: 05 Apr 2012 16:26

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

Post by radio42 » 23 Apr 2020 16:42

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 !

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests