NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Information Community Announcements v
« Previous 1 … 8 9 10 11 12 … 56 Next »
Auto restart recording service utility

 
  • 0 Vote(s) - 0 Average
Auto restart recording service utility
gEd
Offline

Posting Freak

London
Posts: 3,521
Threads: 100
Joined: Jan 2005
#61
2008-04-22, 08:18 AM
try adding a check for the file at the same time as you check for the PID.

e.g.

If $PID AND If NOT FileExists( c:\temp\epgupdate.txt ) Then...

not too sure of the syntax there (I'm at work atm) if that doesn;t work, use nested IF's
“If this is the way Queen Victoria treats her prisoners, she doesn't deserve to have any.”
frankmcg
Offline

Senior Member

Posts: 312
Threads: 23
Joined: Sep 2006
#62
2008-04-23, 09:56 AM
Still no joy I’m afraid. Your syntax gave an error as you suspected so I used some embedded if functions as you suggested, putting in 2 checks as follows:

If $PID Then
If NOT FileExists( $EPGLock_File ) Then ProcessClose($PID)
Writetolog ("GBPVR killed due to no active window")
EndIf
EndIf

If NOT FileExists( $EPGLock_File ) Then
Run ($GBPVR_Path & $GBPVR_launch, "",@SW_MAXIMIZE )
Writetolog ("GBPVR restarted")
EndIf

If WinWaitActive ( $GBPVR_Window ) Then
WinActivate ( $GBPVR_Window ) ; ensure GB-PVR has focus
Else
; GBPVR failed to start
Writetolog ("Failed to start GBPVR")
MsgBox (0, "FATAL ERROR STARTING GBPVR", "Problem trying to restart GBPVR!!" )
EndIf
EndIf
EndFunc


I've created a key called $EPGLock_File by the way pointing to the c:\temp\epglock.txt log file.

So not sure what's wrong with the methodology here but for whatever reason it’s not doing as it should. Has anyone got any ideas how else we can detect that an EPG update is in progress?
gEd
Offline

Posting Freak

London
Posts: 3,521
Threads: 100
Joined: Jan 2005
#63
2008-04-23, 10:31 AM
so it's still showing "GBPVR killed due to no active window" many times when epg update is taking place?

how can that be?

add a section that says

If FileExists( $EPGLock_File ) Then
Writetolog ("EPG lock file exists")
EndIf

to check things are happening as expected.
“If this is the way Queen Victoria treats her prisoners, she doesn't deserve to have any.”
frankmcg
Offline

Senior Member

Posts: 312
Threads: 23
Joined: Sep 2006
#64
2008-04-24, 07:32 AM
It's like a soap opera this, here's today's installment!

Still getting the below:

24/04/2008 4:58:07.56 standby status is 0x00000012
24/04/2008 4:58:07.85 gbpvr_monitor woke from standby
24/04/2008 4:58:09.17 GBPVR restarted
24/04/2008 4:58:20.18 Ir.exe killed
24/04/2008 4:58:20.82 Ir.exe restarted
24/04/2008 5:11:46.92 GBPVR killed due to no active window
24/04/2008 5:11:46.96 GBPVR restarted
24/04/2008 5:34:47.84 GBPVR killed due to no active window
24/04/2008 5:34:47.87 GBPVR restarted
24/04/2008 5:46:16.95 GBPVR killed due to no active window
24/04/2008 5:46:17.03 GBPVR restarted
24/04/2008 5:55:55.03 GBPVR killed due to no active window
24/04/2008 5:55:55.06 GBPVR restarted
24/04/2008 6:06:16.84 standby status is 0x00000000
24/04/2008 6:06:17.04 standby status is 0x00000004


Here's my func check_gbpvr now:

Func Check_GBPVR ()

If WinExists ( $GBPVR_Window ) then
WinActivate ( $GBPVR_Window )
Else
; No gbpvr window so if process exists, we must have a VMR9 error so kill gbpvr app.
If FileExists( $EPGlock ) Then
RunWait (@ComSpec & ' /c echo %date% %time% EPG lockfile exists >> ' & $Log_file , "" , @SW_HIDE)
EndIf

$PID = ProcessExists($GBPVR_app)
If $PID Then
If Not FileExists( $EPGlock ) Then
ProcessClose($PID)
RunWait (@ComSpec & ' /c echo %date% %time% GBPVR killed due to no active window >> ' & $Log_file , "" , @SW_HIDE)
EndIf
EndIf

If Not FileExists( $EPGlock ) Then
Run ($GBPVR_Path & $GBPVR_launch, "",@SW_MAXIMIZE )
RunWait (@ComSpec & ' /c echo %date% %time% GBPVR restarted >> ' & $Log_file , "" , @SW_HIDE)
EndIf

If WinWaitActive ( $GBPVR_Window ) Then
WinActivate ( $GBPVR_Window ) ; ensure GB-PVR has focus
Else
; GBPVR failed to start
RunWait (@ComSpec & ' /c echo %date% %time% Failed to start GBPVR >> ' & $Log_file , "" , @SW_HIDE)
MsgBox (0, "FATAL ERROR STARTING GBPVR", "Problem trying to restart GBPVR!!" )
EndIf
EndIf
EndFunc


See anything wrong? I've added in checks for the EPG lock file everywhere, log message if it's not found etc. What's interesting is that the first entry to the log doesn't appear until 5:11, but I know from watching it previously that the epgupdate is usually finished by about 5:04. So perhaps the lockfile has already been deleted before the script kicks in (I set the delay to 11 mins). In which case, something else must be blocking it?
gEd
Offline

Posting Freak

London
Posts: 3,521
Threads: 100
Joined: Jan 2005
#65
2008-04-24, 07:22 PM
your nesting is wrong, try this

Func Check_GBPVR ()
If FileExists( $EPGlock ) Then
RunWait (@ComSpec & ' /c echo %date% %time% EPG lockfile exists >> ' & $Log_file , "" , @SW_HIDE)
Else
If WinExists ( $GBPVR_Window ) then
WinActivate ( $GBPVR_Window )
Else
; No gbpvr window so if process exists, we must have a VMR9 error so kill gbpvr app.
$PID = ProcessExists($GBPVR_app)
If $PID Then
ProcessClose($PID)
RunWait (@ComSpec & ' /c echo %date% %time% GBPVR killed due to no active window >> ' & $Log_file , "" , @SW_HIDE)
EndIf

Run ($GBPVR_Path & $GBPVR_launch, "",@SW_MAXIMIZE )
RunWait (@ComSpec & ' /c echo %date% %time% GBPVR restarted >> ' & $Log_file , "" , @SW_HIDE)
If WinWaitActive ( $GBPVR_Window ) Then
WinActivate ( $GBPVR_Window ) ; ensure GB-PVR has focus
Else
; GBPVR failed to start
RunWait (@ComSpec & ' /c echo %date% %time% Failed to start GBPVR >> ' & $Log_file , "" , @SW_HIDE)
MsgBox (0, "FATAL ERROR STARTING GBPVR", "Problem trying to restart GBPVR!!" )
EndIf
EndIf
EndIf
EndFunc

If this still doesn;t work and you don't actually suffer from the vmr9 renderer popup error, you might consider just removing this check from your version of the script.

hth
“If this is the way Queen Victoria treats her prisoners, she doesn't deserve to have any.”
frankmcg
Offline

Senior Member

Posts: 312
Threads: 23
Joined: Sep 2006
#66
2008-04-25, 08:34 AM
EPGlock file is reporting it's existance now a couple of times, but as I suspected it's being deleted around 5:04am just before the computer does a restart from psshutdown (at least I think it's restarting). However I then get the hour or so of killed due to no active window messages before it finally goes to sleep again after 6am. So something else must be going on?

And I do get the vmr9 renderer error, just it doesn't appear in the log so don't want to give up on this bit of code just yet!
frankmcg
Offline

Senior Member

Posts: 312
Threads: 23
Joined: Sep 2006
#67
2008-04-28, 07:48 PM
Quick update, I changed psshutdown to doing a forced standby rather than a restart and the problem goes away! Looking at the event logs it looks as if the script is possibly interrupting the restart and it's getting stuck in a loop of restarting / script running. Why this lasts for an hour though I don't know? Perhaps it's not the epg update after all?
gEd
Offline

Posting Freak

London
Posts: 3,521
Threads: 100
Joined: Jan 2005
#68
2008-04-30, 10:46 PM
glag you appear to have got it sorted. I can;t really think what the problem is with my script. I'll try and have a think about it when I have more time.

btw: I use mce standby tool in conjunction with windows power settings to put the pc into standby after 45mins of inactivity.
“If this is the way Queen Victoria treats her prisoners, she doesn't deserve to have any.”
ReZnOriO
Offline

Junior Member

Posts: 12
Threads: 9
Joined: Sep 2005
#69
2008-06-02, 06:02 PM
Argh.. I see "I've uploaded it" and it seems everyone knows where to get the latest script but http://gbpvr.com/pmwiki/pmwiki.php/Utility/StartGBPVR is dead and I don't know where it's being uploaded to.

If anyone knows and paste it here , it would be appreciated.
Thanks!
ReZ
K.S.
Offline

Senior Member

Posts: 526
Threads: 12
Joined: Oct 2006
#70
2008-06-03, 10:59 AM
gEd always updates the script in the first post, so i would try that Wink
the wiki script is not the same, gEd's version is a derived work, if you seek the latest wiki version, it's either in the wiki or ask liteswap in his support thread
sub Wrote:Yep, what he said.

curiosity killed the cat Big Grin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (8): « Previous 1 … 4 5 6 7 8 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  Auto loader for DirectVobSub (Blu-ray Forced subtitles) whurlston 63 31,765 2015-05-14, 08:41 AM
Last Post: Lao Pan
  NextPVR UI Web Service bgowland 2 2,978 2012-02-01, 07:12 PM
Last Post: pBS
  Windows Desktop/Sidebar Gadget with Recording Schedule cncb 0 1,993 2011-09-29, 12:49 PM
Last Post: cncb
  MpegImport utility added to wiki sixgun 66 25,109 2010-05-25, 01:48 PM
Last Post: carpeVideo
  Enhanced Web Admin (EWA) Build 81 BETA Web Service Release UncleJohnsBand 0 1,543 2009-05-22, 09:05 PM
Last Post: UncleJohnsBand
  Showname - Rename utility for GBPVR recordings Anthony 0 1,619 2009-03-05, 05:40 PM
Last Post: Anthony
  Utility to help with Channel Scanning timh 8 4,324 2009-02-09, 12:49 PM
Last Post: timh
  HVR 1300 Recording Quality Improvement garymeds 4 2,476 2008-07-02, 11:24 PM
Last Post: bunegg
  I-xmltv: TV Guide customization & Zap2It EPG utility. Jim_ 304 105,311 2007-09-18, 02:20 PM
Last Post: lrf2005
  File Renaming Utility: AddEpisode turkey 11 4,333 2007-04-30, 10:48 PM
Last Post: David

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode