NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 7 8 9 10 11 … 93 Next »
Is there something recording?

 
  • 0 Vote(s) - 0 Average
Is there something recording?
Tre4Bax
Offline

Member

Posts: 98
Threads: 30
Joined: Mar 2013
#1
2013-08-02, 08:01 PM
Hi There,

Does anyone know how I would find out if the PVR is actually recording or not at a particular time. I want to write some code that will turn the box to standby in response to the remote, but only if there is nothing currently recording. At the moment the thing just turns off anyway and dumps the recording.....

Many thanks,

Trevor
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#2
2013-08-03, 06:46 AM
query the database with "SELECT name FROM scheduled_recording WHERE status = 1 order by start_time limit 1"
which returns actively recording shows...if any returned, it's recording...check next recording time also, to make sure none are about to record in next few mins either..
use "select name, start_time FROM scheduled_recording WHERE status = 0 order by start_time limit 1" for next recording..
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#3
2013-08-03, 08:47 AM
imilne (author of the System plugin) may be able to supply a code snippet to do this - the plugin warns you if you try to power of the PC while NextPVR is recording is in progress or is starting soon.
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#4
2013-08-03, 03:28 PM
That code relies on the NPVR api though, so it would be useless outside of the app.

I personally never bother putting my htpc into standby manually. We got into the habit years ago of always exiting live TV when 'done' and just let the 5 minute idle timeout that's set in Windows take care of putting it into sleep mode. No horrible 'oh crap' moments doing it that way.

Iain
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,130
Threads: 957
Joined: May 2006
#5
2013-08-03, 08:14 PM
imilne Wrote:I personally never bother putting my htpc into standby manually. We got into the habit years ago of always exiting live TV when 'done' and just let the 5 minute idle timeout that's set in Windows take care of putting it into sleep mode. No horrible 'oh crap' moments doing it that way.

I agree that is the most reliable way for me. I am my own worst enemy and I think in the last year my only two missed recordings was because I shut down the recording service blindly to apply a patch or new version.

Martin
martint123
Offline

Posting Freak

UK, East Yorkshire
Posts: 4,658
Threads: 208
Joined: Nov 2005
#6
2013-08-03, 10:25 PM
Likewise, I just let the system handle it. Although, come to think of it, I have a couple of scheduled daily events at 1700 and 2200 to set the sleep/hibernate times to 30 and 5 minutes respectively. Probably time to get rid of them now.
Tre4Bax
Offline

Member

Posts: 98
Threads: 30
Joined: Mar 2013
#7
2013-08-04, 07:39 AM
Many thanks,

I have been using LMRemote to just blast the telly turning off the monitor the waiting for it to sleep, this seems to work but the blaster element of LMRemote is unreliable so often just stops working. This leaves my wife feeling the TV is still on. My plan was to write something that could be called by LMRemote but that would only switch off if there was nothing recording. Actually looking into the future would be good too to prevent it going to sleep when it really needs to wake up in three minutes....

Theoretically windows should do this for me but for some reason the remote just overrides everything and the box goes straight to standby.

Many thanks for your helps and tips.
Tre4Bax
Offline

Member

Posts: 98
Threads: 30
Joined: Mar 2013
#8
2013-08-04, 07:42 AM
Is there some way that the power off functionality of the system app could be invoked through the keyboard? If I could get LM Remote to call that to standby/hibernate then that would be perfect. A dialog coming up to warn would really help.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Custom recording tomx 2 721 2025-02-07, 09:14 AM
Last Post: tomx
  API call for Recording Complete linustorvalds 1 480 2025-01-19, 02:11 PM
Last Post: mvallevand
  Manual recording API mvallevand 2 1,141 2023-11-09, 02:14 PM
Last Post: mvallevand
  Recording direct to GPhotos API rgonzalez 0 1,527 2020-06-29, 04:45 AM
Last Post: rgonzalez
  Recurring Recording URL Parameters jcole998 2 3,082 2019-09-19, 01:08 PM
Last Post: jcole998
  Get recording length from stream skogl 46 14,570 2019-08-15, 09:34 PM
Last Post: sub
  Unexpected result when deleting a pending recording scJohn 5 3,899 2018-05-06, 10:09 PM
Last Post: sub
  How to best verify success when adding a recurring recording drmargarit 1 2,888 2017-03-02, 03:13 PM
Last Post: mvallevand
  Change recording filename programmatically immediately before recording starts? craigrs84 5 6,237 2015-07-13, 09:28 PM
Last Post: patco444
  Recording a specific episode based on season and episode number cbgifford 26 10,812 2014-12-19, 10:28 PM
Last Post: cbgifford

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

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

Linear Mode
Threaded Mode