|
SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
Email on new SageTV File
The one thing i like about HuluPlus is that it emails me when a new show is in my queue.
Has anyone found a way to have a program email them upon discovering a new file in the TV directory? Google reveals some, but nothing that seems trustworthy. |
#2
|
|||
|
|||
You can use dirmon to do something like that in Windows.
__________________
Running SageTV on unRAID via Docker Tuning handled by HDHR3-6CC-3X2 using OpenDCT |
#3
|
||||
|
||||
cool thanks
|
#4
|
|||
|
|||
I am sure that you could probably do this with SJQ as well. I have my system send me an email at midnight detailing the next day's recordings. I also put in hyperlinks so that I can quickly check out more info.
The emails look like this: Quote:
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
#5
|
||||
|
||||
I'm trying to learn about SJQ but its slow going. Any chance you can get me the script for that so I can see how its built?
|
#6
|
|||
|
|||
I am travelling for a few days but I will post my code when I return.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
#7
|
|||
|
|||
OK, back home and here is the code:
Code:
/* Daily Email for Sage Recordings Last Modified: 14 Jan 2012 Author: Wayner although I steal most of the code from... Derek Battams <derek AT battams DOT ca> Run this script daily to produce a report of the day's upcoming recordings. Each show includes a link to the web interface, which will allow you to record the airing, if so desired. This script requires SRE as it notes if SRE is monitoring the recording. If running from the SageGroovy environment make sure to copy all SRE JAR files to the Sagegroovy/lib folder. I set this to email at 12:01 every morning. You MUST change the settings below, especially the email settings if you want this script to email the output. The script is written for the SJQv4 environment and expects it is running in that environment. */ import com.google.code.sagetvaddons.sre.engine.DataStore def BASE_URL = 'http://myserver.dyndns.org:8080/sage' // Base URL to web interface, with NO trailing slash def sageweburl = BASE_URL+'/Home' // This is where the Sage Web home page resides def sagemobweburl= 'http://myserver.dyndns.org:8080/sagem/m/menu.js' // Same for the Sage mobile web page private class EmailSettings { static def sendMail = true // Set this to false to just dump the alert msg to stdout instead of emailing it static def host = 'smtp.gmail.com' static def user = 'fred.flinstone@gmail.com' static def pwd = 'Wilma' static def port = '465' static def subj = 'Sage Recordings for Today' static def from = user // Gmail will reject mail via SMTP if the from addr != user id so no point in changing this static def to = 'fred.flinstone@gmail.com' // Sometimes Gmail won't send an email addressed to yourself, try a plus address at the end; YMMV static def ssl = 'true' // Gmail requires SSL, other SMTP servers may or may not; this is a STRING setting! } def sendMail(def msg) { def ant = new AntBuilder() ant.mail(mailhost: EmailSettings.host, mailport: EmailSettings.port, subject: EmailSettings.subj, user: EmailSettings.user, password: EmailSettings.pwd, ssl: "true") { from(address: EmailSettings.from) to(address: EmailSettings.to) message(msg) } } def start = new Date() start[Calendar.HOUR_OF_DAY] = 0 start[Calendar.MINUTE] = 0 start[Calendar.SECOND] = 0 def end = new Date(start.getTime() + 1L*1000L *3600L * 24L) // 1 day * 1000ms/s * 3600s/hr * 24hr/day def shows = new HashSet() def airings = [] airings=Global.GetScheduledRecordingsForTime(start.getTime(), end.getTime()) def datastore = DataStore.getInstance() def msg = new StringBuilder() StartTime=start.format('EEEE MMM d hh:mm a') EndTime=end.format('EEEE MMM d hh:mm a') msg <<"TV Recording Schedule for: $StartTime to $EndTime\n" msg <<"-----------------------------------------------------------------------------\n" airings.each { msg << "${new Date(AiringAPI.GetAiringStartTime(it)).format('hh:mma')} to ${new Date(AiringAPI.GetAiringEndTime(it)).format('hh:mma')}\n" msg << "${ShowAPI.GetShowTitle(it)} - " SRE1 = datastore.getMonitorStatusByObj(it) SRE = SRE1.toString() if (SRE == "NO_MONITOR") { msg << "${ShowAPI.GetShowEpisode(it)}\n"} else { msg << "${ShowAPI.GetShowEpisode(it)} - SRE is monitoring\n"} msg << "${BASE_URL}/DetailedInfo?AiringId=${AiringAPI.GetAiringID(it)}\n\n" } msg << "To edit go to: $sageweburl\n" msg << "or for mobile: $sagemobweburl\n" if(EmailSettings.sendMail && msg.toString()) sendMail(msg.toString()) else if(msg.toString()) println msg return 0
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server |
#8
|
||||
|
||||
awesome thanks!
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Issues with email updates from SagetV forums | wayner | General Discussion | 4 | 12-01-2011 09:21 AM |
Sagemc email | blwegrzyn | SageMC Custom Interface | 1 | 05-30-2009 10:55 AM |
SageGk | SageMC Custom Interface | 13 | 06-17-2008 09:51 AM | |
Use main work/email/web computer as SageTV server? | misterj | Hardware Support | 7 | 08-15-2007 12:15 AM |
Email Plugin? | Tony414 | SageTV Customizations | 0 | 01-27-2005 02:31 PM |