NextPVR Forums

Full Version: NEWA Auto-Search Command Line Interface (CLI)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
Attached is the first release of the command line interface to run auto searches used by NEWA that are flagged for auto-search (set reminders....but there is none at this point) or auto-record (record matching shows automatically).

The wiki has the explanation of what Auto-Search/Record can do as well as how to use this command line programme to run your saved Auto-Searches outside of EWA via your favorite scheduling package.

Post any results/issues you find in this thread....

Thanks.

[Edit] 2011-10-14: Updated to latest NEWA Schedule class which includes day filtering and several bug fixes. Just replace your existing files.
so would I understand matters correctly if I thought I could put this command into the new PostUpdateEPG.bat to have the auto-record processing done each morning after the EPG update completes?
johnsonx42 Wrote:so would I understand matters correctly if I thought I could put this command into the new PostUpdateEPG.bat to have the auto-record processing done each morning after the EPG update completes?
I don't think this is practical, unless you put a one hour delay into PostUpdateEPG.bat before calling the CLI.

From the wiki
Quote:If set, the Auto-Search/Record feature will only run one time per day. It will only run when at least 1 hour has elapsed since your scheduled EPG update time for that day. This helps ensure that your searches are executed against the most recent EPG load and only run one time each day.
ah, somewhere I thought I had understood that the CLI auto-search would not be restricted by the one hour delay time.

thank you for clarifying that.
ACTCMS Wrote:I don't think this is practical, unless you put a one hour delay into PostUpdateEPG.bat before calling the CLI.

From the wiki

johnsonx42 Wrote:ah, somewhere I thought I had understood that the CLI auto-search would not be restricted by the one hour delay time.

thank you for clarifying that.

I just looked how the code in NEWA kicks off the auto-search logic....it does wait until 1 hour after the epg update time.....I think I should port this logic into the CLI.

Thoughts?
My thought would be this:

If I run a command to start the auto-record search, it ought to just go ahead and do it... trust that I have executed the command after the EPG update is complete. Things like this are precisely what the PostUpdateEPG.bat is for.

Also, let's say the command is executed and the EPG udpate for the day isn't completed: then it runs against yesterday's EPG data, which was good enough yesterday so it can't be that far off today.
johnsonx42 Wrote:My thought would be this:

If I run a command to start the auto-record search, it ought to just go ahead and do it... trust that I have executed the command after the EPG update is complete. Things like this are precisely what the PostUpdateEPG.bat is for.

Also, let's say the command is executed and the EPG udpate for the day isn't completed: then it runs against yesterday's EPG data, which was good enough yesterday so it can't be that far off today.

The current CLI code checks to see if the auto-record processing has run for today (there is a date stored in the config-web.xml file that NEWA uses) and if it hasn't run that day it will call the auto-record logic and then update the last run date. If it has already run then it will just write to the log that it has already been run for the day and will not call the auto-record logic.

This is needed so that users that are not using the CLI & just rely on the auto-processing built into accessing NEWA do not have the auto-record execute every time they access NEWA.....depending on the number of searches that are set as auto-record, the number of channels and the number of matches found it can be a long process.

So if you set it up in your postepg processing it will run fine.....you are correct about what occurs if it runs and the epg update has not yet run......it will simply perform the search against a day-old EPG.....However....it does setup a hole if the EPG update for the day has not run. If per-chance an event comes in with a match for the search that falls on today you would miss the recording.

I agree.....that if this is in the postepg processing file the above should not be an issue.

I am going to open a method in the web services to call the auto-search logic....but there I think I will do what is in NEWA login process and ensure that it is a least an hour past the EPG update time that the user sets in the config setting of NPVR.
(grrr, post disappeared)...

Myself, I would lke a CLI to do as it is told "now". Let windows GUI's make decisions for users, but a CLI to do as it is told.
Possibly a parameter could be used to alter it's operation i.e. /f for forcing a a scan/update and blank to let the CLI decide.

Martin
UJB and I are working out a way for users to initiate the auto-record process from SearchLite. Optionally SearchLite will start then proces whenever NextPVR is launched and whenever it's been 24h it will run.

Martin
so then if SearchLite is installed, then there will be no need to run the auto-search cli command separately?
Pages: 1 2 3 4 5