NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Information Community Announcements v
« Previous 1 … 50 51 52 53 54 … 56 Next »
RecStatus.exe - returns current recording status

 
  • 0 Vote(s) - 0 Average
RecStatus.exe - returns current recording status
jimh
Offline

Member

Posts: 77
Threads: 9
Joined: Jan 2005
#1
2005-03-07, 11:58 PM
Per a request in the Wishlist forum, I've written a command-line utility called RecStatus.exe.

You run it from the command line (or from within a batch file) with the following options:
 time=xx  where xx is the number of MINUTES to look ahead for a pending program to be recorded;
 silent=yes [no]  this sets whether the utility suppresses all text output about the results.
                 EXAMPLE: RecStatus.exe time=10 silent=no

The utility returns the following exit codes, which can be processed by the batch file that calls it:
2 - there is a program currently recording;
1 - program is scheduled to start within the specified number of minutes (takes into account scheduled prepadding);
   0 - all clear - neither of the above is true;

Unless you run it in silent mode, RecStatus will report what program is currently being recorded, otherwise it will report the details of any pending recording that is scheduled to begin within the specified time frame.

Download it here: RecStatus.exe



bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,583
Threads: 384
Joined: Dec 2004
#2
2005-03-08, 03:31 AM
[b Wrote:Quote[/b] (jimh @ Mar. 07 2005,18:58)]The utility returns the following exit codes, which can be processed by the batch file that calls it:
   2 - program is scheduled to start within the specified number of minutes (takes into account scheduled prepadding);
   1 - there is a program currently recording;
   0 - all clear - neither of the above is true;
Did you go and reverse exit codes 1 & 2 again or are you just trying to confuse me?  [Image: smile.gif]

Cheers,
Brian
jimh
Offline

Member

Posts: 77
Threads: 9
Joined: Jan 2005
#3
2005-03-08, 12:03 PM
[b Wrote:Quote[/b] (bgowland @ Mar. 07 2005,22:31)]
[b Wrote:Quote[/b] (jimh @ Mar. 07 2005,18:58)]The utility returns the following exit codes, which can be processed by the batch file that calls it:
   2 - program is scheduled to start within the specified number of minutes (takes into account scheduled prepadding);
   1 - there is a program currently recording;
   0 - all clear - neither of the above is true;
Did you go and reverse exit codes 1 & 2 again or are you just trying to confuse me?  [Image: smile.gif]

Cheers,
Brian
Brian: Neither - I looked back at my original notes (before your suggested swap of the exit codes) when I wrote that post.  I've edited my original post to show the correct exit codes.

So, to make it crystal clear:
The utility returns the following exit codes, which can be processed by the batch file that calls it:
  2 - there is a program currently recording;
  1 - program is scheduled to start within the specified number of minutes (takes into account scheduled prepadding);
  0 - all clear - neither of the above is true;



jimh
Offline

Member

Posts: 77
Threads: 9
Joined: Jan 2005
#4
2005-03-13, 12:29 PM
An updated version of my RecStatus.exe command-line utility (version 0.95beta) is now available.

Link: RecStatus.exe

These are the enhancements:
1. Added a new commandline parameter "GBPVR=". For those users who do not have GBPVR installed in the customary c:\program files\devnz\gbpvr directory, use this to specify where GBPVR is installed;
This feature also enables you to check for pending programs by running the util on a PC that is networked to your GBPVR box - simply specify the network path to the GBPVR directory.

2. RecStatus now lists all pending programs found within the specified time frame.
This is a handy way to quickly see, for example, all recordings scheduled for the next 24 hours (specify time=1440).

I welcome any posts regarding bugs/comments/suggestions.



KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#5
2005-03-13, 04:50 PM
Jimh, if you use the WIN32 perl module, you should be able to read the Registry to grab the location that GBPVR is installed in, eliminating the need for the extra command line option.

Here is some example C# code that extracts this information:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
RegistryKey regKey = Registry.LocalMachine;
regKey = regKey.OpenSubKey("SOFTWARE");
regKey = regKey.OpenSubKey("devnz");
this.gbpvrPath = (string)regKey.GetValue("GBPVR InstallDir");
[/QUOTE]

Using the WIN32 module you should be able to extract the same information.
jimh
Offline

Member

Posts: 77
Threads: 9
Joined: Jan 2005
#6
2005-03-13, 05:41 PM
[b Wrote:Quote[/b] (KingArgyle @ Mar. 13 2005,11:50)]Jimh, if you use the WIN32 perl module, you should be able to read the Registry to grab the location that GBPVR is installed in, eliminating the need for the extra command line option.

Here is some example C# code that extracts this information:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
RegistryKey regKey = Registry.LocalMachine;
regKey = regKey.OpenSubKey("SOFTWARE");
regKey = regKey.OpenSubKey("devnz");
this.gbpvrPath = (string)regKey.GetValue("GBPVR InstallDir");

Using the WIN32 module you should be able to extract the same information.[/QUOTE]
KingArgyle:

Thanks for the tip. I'll update the utility so that it pulls the GBPVR dir from the registry unless overridden by a command-line parameter.

- Jim
gblinckmann
Offline

Member

Posts: 59
Threads: 9
Joined: Jul 2004
#7
2005-03-18, 02:33 AM
Am I mistaken, or do you only get the current recording listed? I have two recording sources and none of the other scheduled recordings come up when I'm currently recording something.
GBPVR v0.94.12 - Windows MCE 2005 SP2
ASUS P4P800 Deluxe with P4 HT 2.6GHz + 1GB RAM
160GB & 250GB SATA 7200 RPM HDD's, 2 200GB ATA/133 7200 RPM HDD's
(2) WinTV PVR-150MCE's - (2) Media MVP HAU 1000's
jimh
Offline

Member

Posts: 77
Threads: 9
Joined: Jan 2005
#8
2005-03-18, 11:40 AM
[b Wrote:Quote[/b] (gblinckmann @ Mar. 17 2005,21:33)]Am I mistaken, or do you only get the current recording listed? I have two recording sources and none of the other scheduled recordings come up when I'm currently recording something.
Yes - that is correct.

I wrote this utility because people needed a way to know whether GBPVR was currently recording or was about to start recording so that their batch file would know if it was safe to proceed with a certain operation.

As a result, if the utility finds that GBPVR is currently recording, there is (or was) no reason to look to pending recordings.

If there is a need for this, I can certainly add that feature to the next release.

- Jim
Pioneer4x4
Offline

Posting Freak

Posts: 926
Threads: 50
Joined: Jan 2005
#9
2005-03-19, 12:42 AM
Works great. Thanks! I don't really have a need for it, but I have some ideas....
3x MVPs (not used anymore)
XBMC
Hauppauge 150 via SVideo
Comcast Digital Cable
Motorola HD Cable box channel changed via Firewire
Vista Home Premium with RDP hack
AMD Athalon 64 5000+
340gig sata, plus 80SATA+3x160IDE Drives in XP machine for storage.
gblinckmann
Offline

Member

Posts: 59
Threads: 9
Joined: Jul 2004
#10
2005-03-19, 01:50 AM
[b Wrote:Quote[/b] (jimh @ Mar. 18 2005,06:40)]As a result, if the utility finds that GBPVR is currently recording, there is (or was) no reason to look to pending recordings.

If there is a need for this, I can certainly add that feature to the next release.

I've actually found a completely different use for this utility, in addition to the one that you intended. I've made a batch file that I'm calling in the postEPGupdate routine. This writes a temporary file with the output of RecStatus for the next 24 hours and then I use blat to email it to myself and my wife. This allows us to double-check that we are not missing any recordings for the day.

It may not be what you intended, but the wife sure appreciates it!  [Image: biggrin.gif]
GBPVR v0.94.12 - Windows MCE 2005 SP2
ASUS P4P800 Deluxe with P4 HT 2.6GHz + 1GB RAM
160GB & 250GB SATA 7200 RPM HDD's, 2 200GB ATA/133 7200 RPM HDD's
(2) WinTV PVR-150MCE's - (2) Media MVP HAU 1000's
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Windows Desktop/Sidebar Gadget with Recording Schedule cncb 0 1,804 2011-09-29, 12:49 PM
Last Post: cncb
  Auto restart recording service utility gEd 79 28,634 2010-01-13, 05:16 PM
Last Post: liteswap
  Patch for current NZ Freeview DVB-T trials sub 14 11,338 2009-07-10, 02:42 AM
Last Post: JonnyCam
  WIKI Status fhmanas 3 1,860 2009-03-04, 02:06 PM
Last Post: McBainUK
  HVR 1300 Recording Quality Improvement garymeds 4 2,203 2008-07-02, 11:24 PM
Last Post: bunegg
  System Status v3.6 psycik 1 1,782 2006-05-14, 12:08 AM
Last Post: MixMan
  RecStatus - new version 0.98beta (April 4, 2005) jimh 7 3,414 2006-04-11, 10:48 PM
Last Post: DenverDon
  System Status - version 3.4 psycik 0 931 2005-12-17, 11:30 PM
Last Post: psycik
  Shutdown computer when current recording session completes Mister Slimm 3 1,795 2005-11-26, 05:14 PM
Last Post: Mister Slimm
  Restart Recording Service Plugin pbb 3 1,824 2005-11-22, 04:14 AM
Last Post: pbb

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

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

Linear Mode
Threaded Mode