Page 1 of 4 123 ... LastLast
Results 1 to 10 of 38

Thread: NEWA Auto-Search Command Line Interface (CLI)

  1. #1
    Join Date
    Feb 2005
    Location
    Pennsylvania, USA
    Posts
    5,525

    NEWA Auto-Search Command Line Interface (CLI)

    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.
    Last edited by UncleJohnsBand; 2011-10-15 at 03:00 AM. Reason: Updated bits

  2. #2
    Join Date
    Sep 2008
    Location
    California
    Posts
    7,111
    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?
    NPVR Tech Support Sticky - - http://forums.nextpvr.com/showthread...931#post480931
    ---------------------------
    my server: NPVR 4.0.4/Win10Pro 32-bit/AMD A6-7400K/hvr-2250 & hvr-1250 with Winegard Flatwave antenna/Schedules Direct
    playback client: Google Nexus Player running Android 7.1.2/Kodi 17.3 (bad 1080i MPEG-2 playback) & X-NEWA 2.5.1

  3. #3
    Join Date
    Jun 2007
    Location
    Scotland
    Posts
    2,702
    Quote Originally Posted by johnsonx42 View Post
    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
    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.

  4. #4
    Join Date
    Sep 2008
    Location
    California
    Posts
    7,111
    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.
    NPVR Tech Support Sticky - - http://forums.nextpvr.com/showthread...931#post480931
    ---------------------------
    my server: NPVR 4.0.4/Win10Pro 32-bit/AMD A6-7400K/hvr-2250 & hvr-1250 with Winegard Flatwave antenna/Schedules Direct
    playback client: Google Nexus Player running Android 7.1.2/Kodi 17.3 (bad 1080i MPEG-2 playback) & X-NEWA 2.5.1

  5. #5
    Join Date
    Feb 2005
    Location
    Pennsylvania, USA
    Posts
    5,525
    Quote Originally Posted by ACTCMS View Post
    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 Originally Posted by johnsonx42 View Post
    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?

  6. #6
    Join Date
    Sep 2008
    Location
    California
    Posts
    7,111
    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.
    NPVR Tech Support Sticky - - http://forums.nextpvr.com/showthread...931#post480931
    ---------------------------
    my server: NPVR 4.0.4/Win10Pro 32-bit/AMD A6-7400K/hvr-2250 & hvr-1250 with Winegard Flatwave antenna/Schedules Direct
    playback client: Google Nexus Player running Android 7.1.2/Kodi 17.3 (bad 1080i MPEG-2 playback) & X-NEWA 2.5.1

  7. #7
    Join Date
    Feb 2005
    Location
    Pennsylvania, USA
    Posts
    5,525
    Quote Originally Posted by johnsonx42 View Post
    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.

  8. #8
    Join Date
    Nov 2005
    Location
    East Yorkshire, England
    Posts
    4,524
    (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

  9. #9
    Join Date
    May 2006
    Location
    Canada
    Posts
    25,769
    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

  10. #10
    Join Date
    Sep 2008
    Location
    California
    Posts
    7,111
    so then if SearchLite is installed, then there will be no need to run the auto-search cli command separately?
    NPVR Tech Support Sticky - - http://forums.nextpvr.com/showthread...931#post480931
    ---------------------------
    my server: NPVR 4.0.4/Win10Pro 32-bit/AMD A6-7400K/hvr-2250 & hvr-1250 with Winegard Flatwave antenna/Schedules Direct
    playback client: Google Nexus Player running Android 7.1.2/Kodi 17.3 (bad 1080i MPEG-2 playback) & X-NEWA 2.5.1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •