[Script] Skipped Line While Filter Gives Results

You have a question or need an advice about how to do something? Ask it here!
Post Reply
User avatar
sun7radio
Posts: 79
Joined: 06 Mar 2014 10:14
[Script] Skipped Line While Filter Gives Results

Post by sun7radio »

Hello,

I've carefully red this topic:
viewtopic.php?f=9&t=620
and some others regarding history checks and how they work.

From my understanding, if a script line gives results even through a filter, this line should never be skipped. What could happen though, if history check is violated, it could returns a double or a song played recently, but the line shouldn't be skipped.

Is that correct ?

Because if so, there seem to be an issue:
I've just tested a program where a script line has been skipped while its filter always return 3 results (checked also in the Find Track window).
(the filter has been apply on a Category instead of a Library, but this Category contains several Libraries and I cannot check on Categories from the Find Track window :/)

Could there be another reason for this to happen ?

Cheers,
Guy.
User avatar
sun7radio
Posts: 79
Joined: 06 Mar 2014 10:14
Re: [Script] Skipped Line While Filter Gives Results

Post by sun7radio »

radio42 wrote:Also check this thread:
viewtopic.php?f=9&t=675
As such a script-line might be skipped, if only the "ForceLibraryHistoryCheck" option is set (but not the "SupressHistoryCheck" option).
Yes I've red this thread too indeed, and in my case the "ForceLibraryHistoryCheck" is NOT set.
radio42 wrote:Nevertheless, how are you testing things, that a script-line is skipped?
I'm running a program with a script I have created, and the skipped line is in between two sweepers. When the program is running, I can notice the line is skipped because the two sweepers appear next to each other in the playlist, without the song in between.
radio42 wrote:Note, that the Find-Window does NOT perform the global song history checks as a script is doing!
As such, of course in the Find Window result, there might be entries displayed - but those displayed find results might still violate the global song history checks!
So why do you believe this is an issue?
This is a serious issue because according to what I've red in the two threads, no line should be skipped as long as the "ForceLibraryHistoryCheck" is NOT set AND the filter gives result(s), EVEN if it violates the history checks.
So in my case the line should NOT be skipped, but it is.
radio42 wrote:Plus note, that when you have specified a 'Category' within a 'Random' script-line, this means, that first a random media library is picked and PF then tries to find a track within that lib using the filter.
If no track is found another random media library is picked etc. up until a certain amount of retries have been used.
What strange here is that the skipped lines (this happened 3 times with 3 different lines actualy) are all using 'Category'. The other lines using 'Library' do not get skipped, so it seems there is a relation/issue with the Categories here.

Cheers,
Guy.
User avatar
sun7radio
Posts: 79
Joined: 06 Mar 2014 10:14
Re: [Script] Skipped Line While Filter Gives Results

Post by sun7radio »

I've rechecked these conditions.

The Category in question contains 5 Media Libraries, none of them is empty.

And again, applying the same filter from the Find Track windows returns the expected results, a few songs each one of them inside one of the Media Libraries contained in the Category used in the Script Line.
(Albeit from the Find Track window I can't explicitly specify the Category, I have to choose ALL).

So the filter itself is not the issue as it returns results. Even if those results don't pass the History Checks, one result should be returned anyway, which is not the case as the Script Line is simply skipped.

Since you changed the behavior of PFOA regarding the "ForceLibraryHistoryCheck" (cf the thread above), perhaps this change is not complete or has an issue when Categories are used with filters ?
Also, I've noticed, from the Expression Builder, that there is no button 'Test', when the Filter is applied on a Category, while that button is present when building Filters on Media Libraries. Perhaps this is related ?

Cheers,
Guy.
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: [Script] Skipped Line While Filter Gives Results

Post by radio42 »

Also check this thread:
viewtopic.php?f=9&t=675

As such a script-line might be skipped, if only the "ForceLibraryHistoryCheck" option is set (but not the "SupressHistoryCheck" option).

Nevertheless, how are you testing things, that a script-line is skipped?
Note, that the Find-Window does NOT perform the global song history checks as a script is doing!
As such, of course in the Find Window result, there might be entries displayed - but those displayed find results might still violate the global song history checks!
So why do you believe this is an issue?

Plus note, that when you have specified a 'Category' within a 'Random' script-line, this means, that first a random media library is picked and PF then tries to find a track within that lib using the filter.
If no track is found another random media library is picked etc. up until a certain amount of retries have been used.
User avatar
sun7radio
Posts: 79
Joined: 06 Mar 2014 10:14
Re: [Script] Skipped Line While Filter Gives Results

Post by sun7radio »

Ok, so just to inform you it is now working, no Script Line are skipped.

To those who might encounter the same situation, be aware of this, as it was very unclear to me at first:

Granted you don't use the "ForceLibraryHistoryCheck" Script Line Option and your Script Line Filter always gives valid results, your Script Line may still be skipped!

Not by the Global History Checks, not by your Script History Checks, but by a MediaLib History Check.

In that case it is like if your Filter returns 0 result.

Cheers,
Guy.
User avatar
sun7radio
Posts: 79
Joined: 06 Mar 2014 10:14
Re: [Script] Skipped Line While Filter Gives Results

Post by sun7radio »

I've noticed something though, I'm not sure this should be the correct behavior:

With a Media Library which has its History set to 0, and has only one song in it, if you press the 'Reload' button the History automatically change to -1.

This is why I did not noticed the problem at first I guess, because I never changed this setting.

Cheers,
Guy.
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: [Script] Skipped Line While Filter Gives Results

Post by radio42 »

What and how many Media Libs are used within the category?
AND are there any empty media lib being used (having no tracks within the media lib)?

A script-lib would also be skipped, if you specify a Media Lib containing 0 tracks (or your Category doesn't contain any media libs)!

This and the above are effectively the only chance why/when script-lines are being skipped.
So please re-check these conditions.
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: [Script] Skipped Line While Filter Gives Results

Post by radio42 »

In my tests here this is not happening.
And have you specified also a media library history?

Please provide me with your script (.pfp file) as well as a screenshot of your configured Media Libs to take a look at.
You might me PM both...
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: [Script] Skipped Line While Filter Gives Results

Post by radio42 »

That (switching a MediaLib History to -1) has actually been fixed already.

Post Reply