SageTV Community

SageTV Community (http://forums.sagetv.com/forums/index.php)
-   SageTV v7 Customizations (http://forums.sagetv.com/forums/forumdisplay.php?f=47)
-   -   Plugin: Sage Recording Extender 4 (SREv4) (http://forums.sagetv.com/forums/showthread.php?t=57364)

tmiranda 01-14-2012 06:57 AM

Got my overrides setup for the weekend's playoff games :corn:

voorhees 01-14-2012 09:59 AM

Quote:

Originally Posted by tmiranda (Post 524765)
Got my overrides setup for the weekend's playoff games :corn:

+1 Green checks all around.

wayner 01-14-2012 11:25 AM

How can I determine in Groovy if SRE is monitoring an Airing? I am adapting Slugger's Late Night Talk show email script to send a daily Sage Recordings email and I would like to include an indication as to whether or not SRE is monitoring a recording.

Slugger 01-14-2012 11:46 AM

Quote:

Originally Posted by wayner (Post 524781)
How can I determine in Groovy if SRE is monitoring an Airing? I am adapting Slugger's Late Night Talk show email script to send a daily Sage Recordings email and I would like to include an indication as to whether or not SRE is monitoring a recording.

You can use SREv4's DataStore API to query details about airings. You'll have to excuse the lack of docs in the code - I really didn't expect any external users to ever actually consume the API. :)

http://code.google.com/p/sagetv-addo...taStore.groovy

To get the monitoring status of an airing (scheduled to record), use the getMonitorStatusByObj() method. If you pass an airing not scheduled to record then this method will always return a status of UNKNOWN.

wayner 01-14-2012 12:17 PM

Sorry Slugger but I am slow on figuring all of this stuff out. I tried the line:
Code:

msg << "${getMonitorStatusbyObj(it)}\n"
but that is causing an error.

I am ripping off your code from here:
Code:

airings.each {
    msg << "${ShowAPI.GetShowTitle(it)}\n"
    msg << "${ShowAPI.GetShowDescription(it)}\n"
    msg << "${BASE_URL}/DetailedInfo?AiringId=${AiringAPI.GetAiringID(it)}\n\n"
}

How would I add another line that would give me the SRE status using the getMonitorStatusbyObj?

Slugger 01-14-2012 01:52 PM

Quote:

Originally Posted by wayner (Post 524789)
Sorry Slugger but I am slow on figuring all of this stuff out. I tried the line:
Code:

msg << "${getMonitorStatusbyObj(it)}\n"
but that is causing an error.

I am ripping off your code from here:
Code:

airings.each {
    msg << "${ShowAPI.GetShowTitle(it)}\n"
    msg << "${ShowAPI.GetShowDescription(it)}\n"
    msg << "${BASE_URL}/DetailedInfo?AiringId=${AiringAPI.GetAiringID(it)}\n\n"
}

How would I add another line that would give me the SRE status using the getMonitorStatusbyObj?

There's lots going on here... I'm going to toss around some programming jargon, I'll leave you and Google to sort it out. :)

The sagex APIs, which is what's being used above, presents the Sage APIs as a series of static methods. The SREv4 API is an object based API. In short, you have to invoke the SRE API against objects (instead of passing objects to the static method based sagex API).

Here's an SJQ script that will simply dump the monitoring status of each scheduled recording. Hopefully you can massage it as necessary.

Code:

import com.google.code.sagetvaddons.sre.engine.DataStore

def datastore = DataStore.getInstance()
Global.GetScheduledRecordings().each {
  println "${AiringAPI.PrintAiringShort(it)}: ${datastore.getMonitorStatusByObj(it)}"
}
return 0

Output on my system:

Code:

"Cops" at 8:00PM on 287 WUHFDT: NO_MONITOR

"Cops" at 8:30PM on 287 WUHFDT: NO_MONITOR

"Saturday Night Live" at 11:29PM on 256 CIIIDT: NO_MONITOR

"The Simpsons" at Sun, Jan 15 8:00PM on 256 CIIIDT: NO_MONITOR

"NHL Hockey" at Sun, Jan 15 8:00PM on 485 SNHL4HD: VALID

"Family Guy" at Sun, Jan 15 9:00PM on 256 CIIIDT: NO_MONITOR


wayner 01-14-2012 04:01 PM

Got it now, thanks. I was running this in the SageGroovy Console and was getting errors on the line for import com.google.code.sagetvaddons.sre.engine.DataStore.

I was able to fix this by copying sre.jar and sre-common.jar to the lib folder of Sagegroovy. Should I copy all jar files from my SageTV JARs folder to the SageGroovy lib folder?

Slugger 01-14-2012 04:44 PM

Quote:

Originally Posted by wayner (Post 524818)
I was able to fix this by copying sre.jar and sre-common.jar to the lib folder of Sagegroovy. Should I copy all jar files from my SageTV JARs folder to the SageGroovy lib folder?

You can, it would do no harm. Ideally, you keep the two in sync and by doing so you know a script that runs in SageGroovy should run unmodified on your Sage server (but not any Sage server).

rlvogel322 01-15-2012 10:50 AM

I'm sure it's a silly question, but how do you do an override? I go out to liveprdata and see the NY Giants vs. Green Bay but how do I get that into an override?

In the web browser if I put that in as the Title is still shows Monitor status unknown. I must be doing something silly so any help would be appreciated.

I wish my EPG would show the teams instead of TBA.

Edit: Never mind, I figured it out. Need to change Team 1 from Teams TBA to NY Giants and Team 2 from Teams TBA to Green Bay.

spacecadet 01-15-2012 06:59 PM

Quote:

Originally Posted by spacecadet (Post 524164)
These were definitely not matching a favorite and were not a manual recording. I logged Issue 331 with the details.

Thanks!

Using the latest SRE, everything worked great for this weekend's games.

Thanks, Slugger!

tmiranda 01-16-2012 06:59 AM

Quote:

Originally Posted by spacecadet (Post 524889)
Using the latest SRE, everything worked great for this weekend's games.

Thanks, Slugger!

+1. Thanks again Slugger for creating and supporting this plugin, it's one of the things that makes Sage so irreplaceable.

wayner 01-16-2012 12:43 PM

This plugin truly is genius - and it keeps getting better scuh as with the hide timeline feature.

tmiranda 02-20-2012 12:08 PM

NASCAR
 
Slugger,

I missed the end of the Bud Shootout and it reminded me that SRE does not support NASCAR. How difficult is it to create a monitor? Can you point me at some info on how they work and how they are written? (Unless you have the burning desire to write it :) )

Tom

Slugger 02-20-2012 03:18 PM

Quote:

Originally Posted by tmiranda (Post 527327)
Slugger,

I missed the end of the Bud Shootout and it reminded me that SRE does not support NASCAR. How difficult is it to create a monitor? Can you point me at some info on how they work and how they are written? (Unless you have the burning desire to write it :) )

Tom

Not difficult to write it, the difficulty for NASCAR has always been finding a reliable, near real time data source to use to track when a race is actually over. Few have tried, no one's succeeded in actually finding a source.

My policy has always been, and remains, that if you find the data source, I'll write the monitor. The data source must be:
  • Near real time; this means the data source is within 5 mins of real time, preferably within two minutes.
  • The data source is (relatively) easily parsable (i.e. HTML, JSON, XML, etc.); this means not flash based
  • For NASCAR, the source data must include unique details to identify the specific race being monitored and that race name should match the details in the EPG data (or be easily mappable).
  • For NASCAR (or any non-team based event, really), the data source must provide specific, unambiguous data that can be used to easily determine the race (event) is either definitely over/complete/halted/cancelled/etc. or it is definitely still in progress. For team sports, I am always able to find a status of the game ("14:43, 3rd period", "5:05, 2nd half", "Half time", "Overtime", "Final", "Final -OT", "Postponed", "Cancelled", "Delayed", "Intermission", etc.). I know I'm looking for specific key words in these status fields to tell me when a game is over, this is why SRE works so well for team based sports. Whatever data source you come up with must have something similar - there can't be any guessing involved in determining the race's live status.

Find the source with the above requirements detailed, I'll write the monitor.

cat6man 03-01-2012 10:45 AM

35 days, 21 minutes to go
 
it's almost SRE season!
(first red sox game is 35 days away)

SageTV showed my first spring training game in upcoming recordings yesterday, remembering my fave list, after this particular set of favorites had
gone unsatisfied since october.

once again, a shout out for my all time favorite sageTV customization

:clap:

Slugger 03-05-2012 10:58 PM

Plugin EOL notice; project donation to Canadian Cancer Society
 
Effective immediately, official support for this plugin has ended. More details available here.

A special thank you to all who have donated to this project. Because of your support, a donation for a little over $500 has been made to the Canadian Cancer Society. Again, thank you for your support!

wayner 06-01-2012 09:12 AM

Stnaley Cup Finals
 
It appears that both CBC and NBC use the title "Stanley Cup Finals" rather than "NHL Hockey". It appears that SRE is smart enough to catch this - is that correct?

Slugger 06-01-2012 09:41 AM

Quote:

Originally Posted by wayner (Post 532081)
It appears that both CBC and NBC use the title "Stanley Cup Finals" rather than "NHL Hockey". It appears that SRE is smart enough to catch this - is that correct?

Indeed, well, actually, it's livepvrdata.com that's "smart" enough. SRE just blindly passes the show details to livepvrdata and awaits a response. I've done some work on livepvrdata such that it will identify some "one off" titles, such as this one for the Cup finals. You still have to provide the teams - if your EPG says "Teams TBA" or some variation thereof, then you would have to create an override. I've done some work on livepvrdata to try and deduce the teams and though it sort of works, it doesn't work well enough for me to put it into production on the livepvrdata.com site. Will probably pick that up in the fall. Until then, you must provide both teams that are playing in the game in order for it to be properly monitored.

wayner 06-01-2012 09:51 AM

I've added the teams manually. The EPG for CBC currently shows for Game 2: Los Angeles Kings at TBA, Game 3: Teams TBA, Game 4 TBA at Los Angeles Kings. NBC is the same for Game 2 but they don't appear to be carrying games 3&4.

I don't know why the guide doesn't know that the Kings will be in Game 3???

But the guide will likely refresh with the correct teams within the next few days - I think that is what happened for the semis.

darcilicious 06-01-2012 10:35 AM

Quote:

Originally Posted by Slugger (Post 522818)
The first release of SREv4 is expected this coming week.

Is this pretty much a one for one replacement of SREv3? And I just uninstall v3 plug-in and install v4?

(I'm still using SREv3 and we missed recording OT of the first NHL playoff game and I got a cranky look from the hubby -- oops! Currently when I look at my guide via the web gui, and after updating the epg, I see all the games/teams listed correctly but the next few games have ! instead the green check mark :( )


All times are GMT -6. The time now is 06:32 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.