|
SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
How to tell is Sage is recording....
One more question for the collective knowledge base.
Is there any way through scripts, etc to tell if Sage is currently recording a program? I am in the process of setting up some system maintenance and backup scripts. Some of these scripts may need to reboot the computer. I would like to fix it so that the scripts can be aware that Sage is currently recording. This way I can set it up so that when the computer reboots I will not stomp all over a recording. The ideal situation would have me being able to check the Sage recording schedule and then setting off tasks as needed based on the schedule. Any ideas on this? Thanks in advance, Rob Hix |
#2
|
||||
|
||||
This question comes up periodically. While there have been various hacks posted to try to detect whether recording is progress (see this thread for instance), that's not really the right question. What you want to know is whether there are any recordings scheduled during the next few minutes that it will take you to do your chores and reboot. For that, you need an STVI or Java plugin that can interrogate the recording schedule and write it out to an external file that reboot scripts can check. I don't know of any such plugin, but you could check the Downloads area to make sure.
__________________
-- Greg |
#3
|
|||
|
|||
Couple of possiblities:
1. There is a property in the .properties file that might work: Code:
scheduler_export_file - set to write a file out with the current Sage recording schedule, can be used to create a simple web page to show SageTV's current scheduled recordings scheduler_export_file=C\:\\scheduled_recordings.txt Just change the path to where you want the file and don't forget to escape the : and \ with a \ in the pathnames. If that doesn't work then try setting that property to true instead of using a path name, and then look in the SageTV directory for a new text or xml file. 2. Probably the most reliable way would be to install nielms Web User Interface plugin. You can then use: Code:
http://user:password@localhost:8080/sage/Home?xml=currrecording Code:
http://user:password@localhost:8080/sage/Home?xml=nextrecordings Just change Code:
user:password@localhost:8080
__________________
--Jason Server Hardware: GIGABYTE GA-EP45-UD3R, Intel Q9550 CPU 2.83GHz, 11GB RAM, 1xHDHR, 1xHVR1600, 1xHVR2250 29TB Server Storage: 1TB SSD (OS), 1TB (data), 2x6TB+2x10TB (22TB FlexRaid storage pool), 2x2TB (recordings), 1x750GB (VMs). Server Software: Win10 Pro x64 OS, SageTV 64bit v9.2.0.441, Java 1.8 u241, PlayOn, Comskip (Donator) v0.82.003, WampServer v2.5. Clients: 3xHD300s, 2xHD100, 2xPlaceshifters |
#4
|
|||
|
|||
Here is something quick. that can parse the title and start time.
getrecordings.bat Code:
C:\wget\wget.exe h**p://user:password@sageserver:8080/sage/Home?xml=nextrecordings parserecordings.vbs Code:
set xmlDoc = CreateObject("Microsoft.XMLDOM") xmlDoc.async="false" xmlDoc.load("C:\wget\Home@xml=nextrecordings") Set ElemList = xmlDoc.getElementsByTagName("title") title = ElemList.item(0).Text MsgBox title Set ElemList = xmlDoc.getElementsByTagName("airing") startTime = ElemList.item(0).getAttribute("startTime") MsgBox startTime
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct. Last edited by nyplayer; 07-07-2007 at 11:31 AM. |
#5
|
|||
|
|||
Script to check if Sage is Recording.
Hi all,
I have written a VBScript that will check Sagetv to find out if it is recording. You tell it how many minutes of Idle time you need and the task to run and it will do just that. For best performance subtract a least 5 mins from your required time. for. ex 60 mins make it 55... 120 make it 115. It can run On server or from any PC on your network Requirements. 1. Nielms Webserver 2. Wget. It will not run your task if Sage is recording or if the next recording is in fewer minutes than you specified. Below you will find a log of a test shot. It will not hammer Sage with web requests. It will check again when the show has finished recording based on duration. 7/10/2007 8:21:40 AM Will Not Run C:\wget\test.bat requested Idle minutes 54 Next Recording in 39 mins. A Baby Story 7/10/2007 8:21:40 AM Next Check in 40 mins 7/10/2007 9:01:42 AM Will Not Run C:\wget\test.bat Recording ... A Baby Story Next Check in 30 mins 7/10/2007 9:31:42 AM Will Not Run C:\wget\test.bat Recording ... A Baby Story Next Check in 30 mins 7/10/2007 10:01:46 AM Will Not Run C:\wget\test.bat Recording ... Deadliest Catch Next Check in 60 mins Ran C:\wget\test.bat @ 7/10/2007 11:01:49 AM Exiting Script VbScript below - don't change anything below the **** Code:
idleminutes=54 'Minimum time required between recordings (in Minutes). TasktoRun="C:\wget\test.bat" 'Your Batchfile or task to run wgetpath="c:\wget" 'Path that contains WGET user="xxxxx" 'Your User Name password="xxxxx" 'Your password Servername="xxxxx" 'Server name or IP serverport="8080" 'Server Port # '**************************************************************************************************************************************
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct. Last edited by nyplayer; 08-01-2007 at 11:15 AM. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Plugin: Web User Interface for SageTV 2.2-6.6 (V2.25 18 Sep 2009) | nielm | SageTV Customizations | 2644 | 10-24-2016 10:18 AM |
help with four TV Sage setup | Nate | SageTV Software | 9 | 10-18-2006 11:54 PM |
Sage hanging with plextor M402U | etk29321 | Hardware Support | 3 | 06-28-2006 08:04 AM |
Recording that will not go away and I just installed sage | FormatC: | SageTV Software | 1 | 06-12-2006 05:22 PM |
Actively recording in Sage when in KDE. | laurenglenn | SageTV Linux | 2 | 01-20-2006 08:21 PM |