Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: How to initiate auto-search update from a scheduled task

  1. #1
    Join Date
    May 2008
    Location
    Netherlands
    Posts
    11

    How to initiate auto-search update from a scheduled task

    Can anyone else tell me if I can start the auto-search update function from the command line (or any other way). I would like to add it to a scheduled task. This is because sometimes the auto-search seems to miss a few items that are in the EPG. In the config Tab it is possible to click an update button, so i guess it must be possible.

    When does auto-search actually run, it is connected with the epg update of GBPVR right?

    I could do this command line: "PVRX2.exe -UpdateEPGOnly" But i rather just update the auto-search, as I always see that the search may miss some schedules at first, but that the EPG is loaded fine into the database by GBPVR.

  2. #2
    Join Date
    Feb 2005
    Location
    Pennsylvania, USA
    Posts
    5,526
    Quote Originally Posted by difdiffer View Post
    Can anyone else tell me if I can start the auto-search update function from the command line (or any other way). I would like to add it to a scheduled task. This is because sometimes the auto-search seems to miss a few items that are in the EPG. In the config Tab it is possible to click an update button, so i guess it must be possible.

    When does auto-search actually run, it is connected with the epg update of GBPVR right?

    I could do this command line: "PVRX2.exe -UpdateEPGOnly" But i rather just update the auto-search, as I always see that the search may miss some schedules at first, but that the EPG is loaded fine into the database by GBPVR.
    Auto search runs 1 time per day when it has been at least 1 hour since the last EPG update. The check is performed every time you access EWA and the login page is processed.

    The code is isolated into a single class within EWA and could be easily ported out to a command line app. All you need to do to run it are the following two lines of code....

    Code:
                        SavedSearchUtils searchUtil = new SavedSearchUtils();
                        searchUtil.autoSearch(searchUtil.loadAutoSearches());

  3. #3
    Join Date
    Jun 2007
    Location
    Scotland
    Posts
    2,753
    Could something similar work for Auto-Record...

  4. #4
    Join Date
    Feb 2005
    Location
    Pennsylvania, USA
    Posts
    5,526
    Quote Originally Posted by ACTCMS View Post
    Could something similar work for Auto-Record...
    Actually it would because auto-record is part of the save search information and when Auto Search runs it looks to see if Auto Record is set for the search and if it is it sets the recording for found matches.

  5. #5
    Join Date
    May 2008
    Location
    Netherlands
    Posts
    11
    I hate to admit it, but I am at a loss at how to use the code you suggested. Should I make a VB program out of it? Should create my own aspx page wich I then call?

    I tried doing the latter, just for the sake of it, but I couldn;t get it to work, and furthermore I do have a password on the site, so I should overcome that problem as well.

    Could you unclejoghnsband, or someone else give me some more input so I may learn?

    Thanks,

    Peter

  6. #6
    Join Date
    Feb 2005
    Location
    Pennsylvania, USA
    Posts
    5,526
    Drop this into you gbpvr (not gbpvr\web) directory and run it....it does create a log file.....but there isn't much in it....basic GBPVR initialization stuff.

    This should execute whatever auto-searches you have saved.


    Edit: new version on this post.
    Last edited by UncleJohnsBand; 2008-08-31 at 10:41 PM.

  7. #7
    Join Date
    Jun 2007
    Location
    Scotland
    Posts
    2,753
    Great stuff...

    I've now got the fully automatic search and record facility I always wanted.

    It would be worth putting this on the wiki...

  8. #8
    Join Date
    May 2008
    Location
    Netherlands
    Posts
    11
    Super,

    thanks a lot! Now I can go away for a week or two and not bother about having to login to make sure the programs I autosearch are being recorded.

    Cheers

  9. #9
    Join Date
    Feb 2005
    Location
    Pennsylvania, USA
    Posts
    5,526
    Quote Originally Posted by ACTCMS View Post
    Great stuff...

    I've now got the fully automatic search and record facility I always wanted.

    It would be worth putting this on the wiki...
    Yea...but I want to do some code cleanup firtst....it is a real frankensien of code/classes pulled from EWA and thrown into a standalone command line app.....I'll get it there in a little while.....thought I would post it out here first for some testing and feedback first.....

  10. #10
    Join Date
    May 2008
    Location
    Netherlands
    Posts
    11
    You asked for feedback, here it is.. it works like a charm. thx!

Posting Permissions

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