NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Wishlist v
« Previous 1 … 105 106 107 108 109 … 193 Next »
Command-line reporting for record state

 
  • 0 Vote(s) - 0 Average
Command-line reporting for record state
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,595
Threads: 387
Joined: Dec 2004
#1
2005-01-15, 07:56 PM
An obscure one but I can think of a use for it.

A command-line option such as -recstate that returns an error code that could be used in a batch file to indicate whether or not there is a recording in progress - maybe 0 for 'sleeping' and 1 for 'recording active'. A bit like using the systray icon to see if it is sleeping or active.

Cheers,
Brian
janviet
Offline

Member

Posts: 50
Threads: 9
Joined: Apr 2004
#2
2005-02-09, 01:31 PM
Hi Brian,

I would like to second this one...

I want to be able to accept a user request to put my HTPC into standby and postpone actually going into standby if GBPVR is currently recording. To implement this I need such a command line option, or another simple way of getting at the recording status (maybe a small addition to GBPVRTray.exe?)

Regards,

Jan
Rasihasi
Offline

Junior Member

Posts: 4
Threads: 0
Joined: Dec 2004
#3
2005-02-28, 10:02 AM
hi,

i read out the record state with "Tools4ever Sql Utility Version 3.52" (download: http://www.tools4ever.com) at the command line from the table RECORDING_SCHEDULE with a sql-query.
The output you can redirect in a txt-file.
Attend, you must create a odbc-connection to the gbpvr.mdb.

Hope, that helps

cu,

Rasihasi [Image: smile.gif]
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,595
Threads: 387
Joined: Dec 2004
#4
2005-02-28, 04:52 PM
It's not quite what I want but I might be able to use it - thanks, I'll take a look.
jimh
Offline

Member

Posts: 77
Threads: 9
Joined: Jan 2005
#5
2005-02-28, 08:31 PM
[b Wrote:Quote[/b] (bgowland @ Feb. 28 2005,11:52)]It's not quite what I want but I might be able to use it - thanks, I'll take a look.
I'm planning on writing a little utility, say RecordingStatus.exe, that when run from the commandline will return text info including the following:

If GBPVR is currently NOT recording, it will so report.

If GBPVR is currently recording, report the following and then exit.
1. What is being recorded (show name,channel, show title, show description, etc.);
2. Scheduled recording start/stop times;
3. Name of file recording is being written to;
4. Anything else that might be useful that I have yet to think of;

If anyone has any suggestions on what to add or how to present the info, please offer them up now - before I start coding down a different road.

Look for the release in the Announcements forum later this week.  [Image: tounge.gif]
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,595
Threads: 387
Joined: Dec 2004
#6
2005-03-01, 03:02 AM
[b Wrote:Quote[/b] (jimh @ Feb. 28 2005,15:31)]I'm planning on writing a little utility, say RecordingStatus.exe, that when run from the commandline will return text info...
Going back to my original post, an exit code that can be used in a batch file would be useful - no text output would be needed for what I want. Perhaps add a command-line switch such as -s (silent) which supressed text output and only generated the exit code.

What I'd like is two levels of exit code...

1 = Recording or a recording due within 5 minutes.
0 = Not recording anything for at least 5 minutes.

Cheers,
Brian
jimh
Offline

Member

Posts: 77
Threads: 9
Joined: Jan 2005
#7
2005-03-04, 09:08 PM
[b Wrote:Quote[/b] (bgowland @ Feb. 28 2005,22:02)]
[b Wrote:Quote[/b] (jimh @ Feb. 28 2005,15:31)]I'm planning on writing a little utility, say RecordingStatus.exe, that when run from the commandline will return text info...
Going back to my original post, an exit code that can be used in a batch file would be useful - no text output would be needed for what I want. Perhaps add a command-line switch such as -s (silent) which supressed text output and only generated the exit code.

What I'd like is two levels of exit code...

1 = Recording or a recording due within 5 minutes.
0 = Not recording anything for at least 5 minutes.

Cheers,
Brian
Brian:

I've written a command-line utility called RecStatus.exe.

You run it from the command line 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.

The utility returns the following exit codes:

2 - program is scheduled to start within the specified number of minutes (takes into account prepadding);
1 - there is a program currently recording;
0 - all clear - neither of the above is true;

Please download it and test it in your batch file to see if it returns the exit codes that you require of it.  Once you have, I'll post an announcement in the Announcements area for all to see.

Link: RecStatus.exe
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,595
Threads: 387
Joined: Dec 2004
#8
2005-03-05, 03:50 AM
I'm not seeing a 'pending' exit code being returned. It returns 0 when there are no recordings (which is good) but also does within the pending period. I then get exit code 2 returned for a recording in progress.

Would it be logical to keep 2 as 'recording in progress' and have 1 as 'not recording but pending within specified time'? In other words, the lower the number, the safer it is to perform an automated task of some sort (with 2 obviously being not safe at all).
jimh
Offline

Member

Posts: 77
Threads: 9
Joined: Jan 2005
#9
2005-03-05, 02:48 PM
[b Wrote:Quote[/b] (bgowland @ Mar. 04 2005,22:50)]I'm not seeing a 'pending' exit code being returned. It returns 0 when there are no recordings (which is good) but also does within the pending period. I then get exit code 2 returned for a recording in progress.

Would it be logical to keep 2 as 'recording in progress' and have 1 as 'not recording but pending within specified time'? In other words, the lower the number, the safer it is to perform an automated task of some sort (with 2 obviously being not safe at all).
I've tweaked the utility and swapped the exit codes per your suggestion (2 = currently recording, 1=pending, 0=all clear).

Please download and try it and let me know if you are able to correctly get all three possible exit codes.

RecStatus.exe
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,595
Threads: 387
Joined: Dec 2004
#10
2005-03-05, 05:23 PM
Yep - that seems to have done the trick, great stuff.

My main requirement is in silent mode for scheduled batch jobs etc. but I really quite like the info returned in non-silent mode - a useful tool to let me know what's going on just in case I'm about to tweak any settings etc. that might disrupt recordings. Thanks I can see it being really useful and I'm sure others will find it also.

Cheers,
Brian
« 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
  Add the date/timestamp to the EPG Update Complete line.. BigBillSD 3 717 2024-10-10, 09:32 PM
Last Post: mvallevand
  Execute command to specific device when stream is exited boukmandutty 6 1,336 2023-06-09, 12:09 PM
Last Post: mvallevand
  record only in channels of group "x" obelix 0 1,184 2020-04-17, 10:50 PM
Last Post: obelix
  "Speculative recording" - record a title that is not currently in listings martinu 4 2,577 2017-11-09, 10:52 AM
Last Post: martint123
  Re-record Failures mvallevand 13 7,399 2017-08-05, 07:40 PM
Last Post: sub
  Record button twice for series record UncT 4 2,620 2017-07-12, 03:52 AM
Last Post: UncT
  NScriptHelper.exe command to return # of active recordings BrettB 1 2,028 2017-02-27, 05:35 PM
Last Post: HarryH3
  Re-record button if recording gets messed up. koornneef 1 1,968 2017-01-14, 08:50 AM
Last Post: johnsonx42
  Command Line Operations jcole998 0 1,876 2016-09-27, 01:51 PM
Last Post: jcole998
  2nd Immediate Record Function jcole998 0 1,543 2016-03-13, 03:25 PM
Last Post: jcole998

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

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

Linear Mode
Threaded Mode