Regarding Script History Checks

You have a question or need an advice about how to do something? Ask it here!
User avatar
sun7radio
Posts: 79
Joined: 06 Mar 2014 10:14
Regarding Script History Checks

Post by sun7radio »

Hello,

Just to be sure regarding Script History Checks, am I correct assuming that:

1) Setting 'Max. History' to a number greater than 0 has no effect as long as I don't specify a file in 'Add. History'.
2) 'Archive' file is just a file listing played songs, it has no impact on history checks (it is not used by Script History Checks)
3) 'Add. History' is the file I have to use in order to enable Script History Checks.
4) 'Add. History' files is NOT filled with played songs (unless I use the same file with 'Archive').
5) So in order to have incremental checks I must use the same file for both 'Archive' & 'Add. History'.
6) Maximum entries of the 'Archive' file is set by the 'Max. History' parameter.
7) The 'Add. History' file is never touched by the Script (no entries added/removed/limited) unless it is the same used by 'Archive'.
8) The 'Max. History' define the max entries the Script add in the 'Archive' file but also define the max look up count from the 'Add. History' file.

Are all those assumptions correct ?

Regarding 8), lets say I don't specify a 'Archive' file but only a 'Add. History' file. If I set 'Max. History' to, say, 10, the Script History Checks will only look at the first 10 entries from the 'Add. History' file, even if that file contains 500 entries ?

Cheers,
Guy.
User avatar
radio42
Site Admin
Posts: 8926
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Regarding Script History Checks

Post by radio42 »

to 1) No.
Each executed script-line will add tracks to the script history (unless the 'SupressAddHistory' option is used).
The 'Add. History' history is independent of this; but if you set 'Max. History' to 0; loading an addition history file would have no effect ;-)

to 2) Yes.
But today the Archive file actually uses the Script History! As such, if you set the 'Max. History' to 0 there will be no Archive available plus the Archive is limited to 'Max. History' entries plus the Archive will only contain those tracks added to the Script History.
But correct this has NO impact on any history checks!

to 3) No.
It defines an optional playlist file whose entries are added to the script history whenever the script is started.
You just might use the same file as the Archive file in order to make sure, that subsequent script executions doesn't contain the same tracks.

to 4) Yes.
The script only reads entries from the 'Add. History' file.
History entries are only written to the file specified by the 'Archive' file.
(so yes, if both are the same...the script reads and write to the same file)

to 5) Yes and No.
The script history (as well as the global history) is NEVER actually cleared (see exceptions below).
The global history might be persisted globally (see general settings) when the application is closed - but a script history is by default not persisted globally.
So, that option (use the same file for both 'Archive' & 'Add. History') is basically there to persist a script history between two starts of the application!
Exception when the script history is cleared:
a) at startup of the application each script history is empty.
b) If the 'Clear History' option is checked, the script history is cleared with every load or reload of the script

to 6) Yes.

to 7) Yes.

to 8) Yes.

Regarding 8): Yes.
But actually it would look to the last 10 entries from the 'Add. History' file (not the first)!
User avatar
sun7radio
Posts: 79
Joined: 06 Mar 2014 10:14
Re: Regarding Script History Checks

Post by sun7radio »

Ok, thanks for the answers, that helps a lot.

So if I understand you correctly, there is no need at first to give a 'Archive' nor a 'Add. History' file in order to activate Script History Checks.

I just have to set the 'Max. History' parameter greater than 0 and the Script History Checks automatically starts.

If so I must have an issue here or do something wrong because I'm running a test Schedule since more than 24h which contains several Programs/Scripts, each one of them has 'Max. History' set to 60 and 'Clear History' is unchecked. But, after 24h or so, when I click on the 'Max. History' Label in order to see the list of songs, they are all empty, for all Programs/Scripts !?

(all Script Lines playing songs have 'None' as Options)

Shouldn't the played songs appear in this List ? Is it not the List used by this 'automatic' Script History Checks ?

Cheers,
Guy.
User avatar
sun7radio
Posts: 79
Joined: 06 Mar 2014 10:14
Re: Regarding Script History Checks

Post by sun7radio »

My test Schedule has 7 scripts running periodically one after the other, since 24h or so.

None of them has songs listed in its History list.

Perhaps I have a write permission issue or something ?

Where do those lists are supposed to be saved ?

Cheers,
Guy.
User avatar
sun7radio
Posts: 79
Joined: 06 Mar 2014 10:14
Re: Regarding Script History Checks

Post by sun7radio »

So the issue comes from something else.

No song is added to those lists, in any script.

Cheers,
Guy.
User avatar
radio42
Site Admin
Posts: 8926
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Regarding Script History Checks

Post by radio42 »

Please start a program (or the scheduler) if that start a program.
And then check again...
User avatar
sun7radio
Posts: 79
Joined: 06 Mar 2014 10:14
Re: Regarding Script History Checks

Post by sun7radio »

I've just quit/relaunched PFOA, restarted the Scheduler, and now songs appear in the current running Script History list..

Nevermind : )

Cheers,
Guy.
User avatar
sun7radio
Posts: 79
Joined: 06 Mar 2014 10:14
Re: Regarding Script History Checks

Post by sun7radio »

Erm.. no, something is wrong again, all lists are now empty..

I've let the Scheduler run since my previous message.

Now when I reopen the Script window and click on the same History label, the list is empty !?

You are welcome on TeamViewer to seen that by yourself..

Cheers,
Guy.
User avatar
radio42
Site Admin
Posts: 8926
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Regarding Script History Checks

Post by radio42 »

I believe you - I just would have no idea where this should come from...
User avatar
hdradio
Posts: 625
Joined: 10 Apr 2012 17:36
Location: Crete, Hellas
Re: Regarding Script History Checks

Post by hdradio »

I have also a question here.
I am testing script history and I notice that it adds songs everytime the script is queried for new titles and not when they are played.
So if a new program starts and there are left titles on the old playlist (which will delete when the new playlist starts), those titles are considered that have played but have not actually played.

Post Reply