SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations

Notices

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.

Reply
 
Thread Tools Search this Thread Display Modes
  #521  
Old 07-29-2019, 07:06 AM
kchase56 kchase56 is offline
Sage User
 
Join Date: Jun 2008
Posts: 45
Looks like I'm only having an issue with MLB for some reason.
If I use http://localhost:8080/livepvrdata/events?date=20181125, I get the following results which seems to be correct for that date 11/25/2018 =>

COLLEGE BASKETBALL
==================
Florida State vs. Villanova Final
LSU vs. Oklahoma State Final
UAB vs. Canisius Final
Oral Roberts vs. James Madison Final/OT
UNCW vs. E Illinois Final
Duquesne vs. UMass Lowell Final
Cent Michigan vs. Siena Heights Final
Morgan State vs. Mt. St. Mary's Final
Utah vs. Northwestern Final
Fordham vs. Alabama A&M Final
Liberty vs. Savannah State Final
Illinois vs. Miss Valley St Final
Vermont vs. Bucknell Final
Quinnipiac vs. Maine Final
Columbia vs. St Joseph's BKN Final
Morehead State vs. Lipscomb Final
FAU vs. FGCU Final
SIU-E vs. Incarnate Word Final
Southern Miss vs. William Carey Final
Fairfield vs. Denver Final
Oakland vs. N Illinois Final
Bowling Green vs. Drexel Final
Fair. Dickinson vs. Lafayette Final
Wichita State vs. Rice Final
Gardner-Webb vs. Arkansas State Final
UNC Asheville vs. Furman Final
Cent Conn St vs. Pine Manor Final
Hawai'i vs. Fresno State Final
Long Beach St vs. Oregon State Final
Cleveland State vs. Purdue FW Final
SF Austin vs. St. Edward's Final
Seattle vs. Longwood Final
Richmond vs. Hampton Final
Brown vs. Bryant Final
Towson vs. Loyola MD Final
Charleston vs. Memphis Final
USC vs. CSU Bakersfield Final
Samford vs. SC State Final
Grand Canyon vs. La Salle Final
Seton Hall vs. Miami Final

COLLEGE FOOTBALL
================
No games for this date.

MLB BASEBALL
============
No games for this date.

FORMULA ONE RACING
==================
Abu Dhabi Grand Prix Race Complete

NASCAR RACING
=============
No games for this date.

NBA BASKETBALL
==============
Lakers vs. Magic Final
Pistons vs. Suns Final
Raptors vs. Heat Final
Grizzlies vs. Knicks Final
Hawks vs. Hornets Final
Nets vs. 76ers Final
Kings vs. Jazz Final
Trail Blazers vs. Clippers Final

NFL FOOTBALL
============
Bills vs. Jaguars Final
Bengals vs. Browns Final
Jets vs. Patriots Final
Eagles vs. Giants Final
Buccaneers vs. 49ers Final
Panthers vs. Seahawks Final
Ravens vs. Raiders Final
Chargers vs. Cardinals Final
Broncos vs. Steelers Final
Colts vs. Dolphins Final
Vikings vs. Packers Final

NHL HOCKEY
==========
Coyotes vs. Flames Final
Lightning vs. Devils Final
Predators vs. Ducks Final
Kings vs. Oilers Final

COLLEGE SOFTBALL
================
No games for this date.

COLLEGE BASEBALL
================
No games for this date.

WOMEN'S COLLEGE BASKETBALL
==========================
Hawai'i vs. Stanford Final
Fordham vs. Texas Final
Duke vs. Missouri Final
Miami vs. Temple Final
Richmond vs. Virginia Tech Final
Ball State vs. Quinnipiac Final
Bowling Green vs. Mercer Final
W Carolina vs. North Alabama Final
Rider vs. Boston College Final
Florida A&M vs. Omaha Final
Radford vs. Nebraska Final
Fair. Dickinson vs. Howard Final
Sacred Heart vs. Monmouth Final
Brown vs. Bucknell Final
Navy vs. NC A&T Final
Hofstra vs. Stetson Final
New Hampshire vs. Bryant Final
Cent Michigan vs. Chattanooga Final
IUPUI vs. VCU Final
Seton Hall vs. St. Francis BKN Final
UCF vs. Villanova Final
Saint Joseph's vs. Loyola MD Final
Norfolk State vs. Liberty Final
Tenn Tech vs. Old Dominion Final
FIU vs. Campbell Final
C. Carolina vs. Memphis Final
Appalachian St vs. Marshall Final
Butler vs. Illinois State Final
Ga Southern vs. Bethune-Cookman Final
St. Francis PA vs. Duquesne Final
UNC Greensboro vs. NC Pembroke Final
UNC Asheville vs. Wofford Final
Penn State vs. Stony Brook Final
James Madison vs. Winthrop Final
Binghamton vs. Army Final
Colgate vs. Columbia Final
Albany vs. Holy Cross Final
NJIT vs. SE Missouri St Final
Indiana vs. N Illinois Final
Colorado vs. Utah State Final
Colorado State vs. Cornell Final
Northwestern vs. UT Martin Final
Kansas vs. Iona Final
UT Rio Grande vs. St Thomas Hou Final
Auburn vs. Louisiana Final
LSU vs. Little Rock Final
Vanderbilt vs. Presbyterian Final
UMass vs. Fairfield Final
New Orleans vs. UL Monroe Final
Rice vs. McNeese Final
UTSA vs. Weber State Final
UCSB vs. Dartmouth Final
Maine vs. Penn Final
Wright State vs. Marist Final
Virginia vs. Saint Louis Final
Charleston So vs. Jacksonville Final
Lehigh vs. Charlotte Final
American vs. FGCU Final
Washington vs. Michigan Final
San Francisco vs. UT Arlington Final
Nevada vs. USC Final
UNLV vs. Middle Tenn Final
Pittsburgh vs. Tennessee State Final
Oakland vs. Canisius Final
Wisconsin vs. Arkansas Final

Any information on how to proceed debugging this issue would be greatly appreciated. I do have C++ programming experience, but haven't dealt with Java at all.

Thanks.
Reply With Quote
  #522  
Old 07-29-2019, 02:05 PM
kchase56 kchase56 is offline
Sage User
 
Join Date: Jun 2008
Posts: 45
The following line in EventMonitorMLB.groovy =>

static private final String FEED_URL = 'http://mlb.mlb.com/gdcross/components/game/mlb/year_%s/month_%s/day_%s/master_scoreboard.json'

needs to be changed to =>

static private final String FEED_URL = 'http://gd.mlb.com/components/game/mlb/year_%s/month_%s/day_%s/master_scoreboard.json'

Making this change locally and building a new livepvrdata.war file gives me correct results.
Reply With Quote
  #523  
Old 07-29-2019, 04:46 PM
emveepee emveepee is offline
Sage Aficionado
 
Join Date: Nov 2006
Posts: 307
Ah ok, that would be an ipv6 vs ipv4 issue.

Martin
Reply With Quote
  #524  
Old 07-30-2019, 07:06 PM
skiingwiz skiingwiz is offline
Sage Aficionado
 
Join Date: Jan 2005
Posts: 358
Quote:
Originally Posted by kchase56 View Post
The following line in EventMonitorMLB.groovy =>

static private final String FEED_URL = 'http://mlb.mlb.com/gdcross/components/game/mlb/year_%s/month_%s/day_%s/master_scoreboard.json'

needs to be changed to =>

static private final String FEED_URL = 'http://gd.mlb.com/components/game/mlb/year_%s/month_%s/day_%s/master_scoreboard.json'

Making this change locally and building a new livepvrdata.war file gives me correct results.

When I go to the former, it redirects me to the latter, so there should be no difference.

Can you try going to http://mlb.mlb.com/gdcross/component...coreboard.json in your browser? It should redirect you to http://gd.mlb.com/components/game/ml...coreboard.json and return JSON data.

As with the others here, I'm not having any issues, so maybe it's something specific to your system. I even successfully recorded your Mets, since they were beating up on my Pirates.


Edit: Looking at the DNS, mlb.mlb.com routes through akamai whereas gd.mlb.com goes through cloudfront. Are you doing something to block akamai perhaps?

Last edited by skiingwiz; 07-30-2019 at 07:10 PM. Reason: DNS info
Reply With Quote
  #525  
Old 07-30-2019, 10:26 PM
kchase56 kchase56 is offline
Sage User
 
Join Date: Jun 2008
Posts: 45
Quote:
Originally Posted by skiingwiz View Post
When I go to the former, it redirects me to the latter, so there should be no difference.

Can you try going to http://mlb.mlb.com/gdcross/component...coreboard.json in your browser? It should redirect you to http://gd.mlb.com/components/game/ml...coreboard.json and return JSON data.

As with the others here, I'm not having any issues, so maybe it's something specific to your system. I even successfully recorded your Mets, since they were beating up on my Pirates.


Edit: Looking at the DNS, mlb.mlb.com routes through akamai whereas gd.mlb.com goes through cloudfront. Are you doing something to block akamai perhaps?
It does redirect me when using my browser.

I've reverted my changes locally and I've added some println statements and the following println =>

static final Event[] getFeed(Date date) throws IOException {
String dateStr = date.format('yyyy|MM|dd', FEED_TIME_ZONE)
String key = "mlbcom_$dateStr"
def events = AppRuntime.instance.statusCache.get(key)
if(events == null) {
def input = dateStr.split('\\|')
try {
def data = new URL(String.format(FEED_URL, input[0], input[1], input[2])).text
println "data = " + data


Produces the following in sagetv_0.txt =>

Wed 7/31 0:07:53.960 data = <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://gd.mlb.com/components/game/mlb/year_2019/month_07/day_31/master_scoreboard.json">here</a>.</p>
</body></html>



Does this help at all?
Reply With Quote
  #526  
Old 08-01-2019, 08:16 PM
skiingwiz skiingwiz is offline
Sage Aficionado
 
Join Date: Jan 2005
Posts: 358
Quote:
Originally Posted by kchase56 View Post
It does redirect me when using my browser.

I've reverted my changes locally and I've added some println statements and the following println =>

static final Event[] getFeed(Date date) throws IOException {
String dateStr = date.format('yyyy|MM|dd', FEED_TIME_ZONE)
String key = "mlbcom_$dateStr"
def events = AppRuntime.instance.statusCache.get(key)
if(events == null) {
def input = dateStr.split('\\|')
try {
def data = new URL(String.format(FEED_URL, input[0], input[1], input[2])).text
println "data = " + data


Produces the following in sagetv_0.txt =>

Wed 7/31 0:07:53.960 data = <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://gd.mlb.com/components/game/mlb/year_2019/month_07/day_31/master_scoreboard.json">here</a>.</p>
</body></html>



Does this help at all?

That confuses me. According to the documentation, the Groovy URL object uses HttpURLConnection which uses the System Property http.maxRedirects which defaults to 20.

All of this matches up with what I see on my system. I can run just the URL line and get the correct answer, following the redirects.

Are you behind any kind of proxy, or something like that?
Reply With Quote
  #527  
Old 08-01-2019, 09:12 PM
kchase56 kchase56 is offline
Sage User
 
Join Date: Jun 2008
Posts: 45
Quote:
Originally Posted by skiingwiz View Post
That confuses me. According to the documentation, the Groovy URL object uses HttpURLConnection which uses the System Property http.maxRedirects which defaults to 20.

All of this matches up with what I see on my system. I can run just the URL line and get the correct answer, following the redirects.

Are you behind any kind of proxy, or something like that?
I am not behind any kind of proxy.
Reply With Quote
  #528  
Old 08-02-2019, 10:46 AM
kchase56 kchase56 is offline
Sage User
 
Join Date: Jun 2008
Posts: 45
If I run the following groovy script on the server machine, it works perfectly.
Could running the script through the Jetty server be causing this issue?
Attached Files
File Type: zip TestMLBURL.zip (877 Bytes, 12 views)
Reply With Quote
  #529  
Old 08-12-2019, 08:35 PM
skiingwiz skiingwiz is offline
Sage Aficionado
 
Join Date: Jan 2005
Posts: 358
While investigating this issue, I discovered that the gd.mlb.com data source is deprecated and they are directing everyone to move to a new statsapi.mlb.com with a different API and output format. So this issue really is moot.

I have the update ready to go, but I need some time to test it. I was thinking about not releasing it until after this MLB season is over. But if you'd like to test, you can download the war file here (in a zip). It seems to work fine locally, but I have done very little testing so far.
Reply With Quote
  #530  
Old 08-16-2019, 11:30 AM
macsupergeek macsupergeek is offline
Sage Advanced User
 
Join Date: Sep 2008
Location: NJ
Posts: 161
new sports

Any chance the LLWS can be added? Looks like the scores are posted and updated via this website - https://www.littleleague.org/world-s.../world-series/

or maybe even a scrape of this one - looking for it to say final --
https://gc.com/tmt/summer-2019/littl...cb90002195a5da

I guess since its such a temporary and small event, maybe too much work?
__________________
SERVER: Dual Core Xeon 3.0GHz 5160, 8gb RAM, Win7 x64, SageTV 9.0.13.536 w/ BMT, WebUI, OpenDCT, Java 1.70_79
TUNERS: 2 x Ceton PCIe InfinitiTV - FIOS
STORAGE: UNRAID - 8tb for archived shows, DVDs, pictures and music
CLIENTS: 2 x HD200s, 2 x HD300
Reply With Quote
  #531  
Old 08-19-2019, 07:44 PM
skiingwiz skiingwiz is offline
Sage Aficionado
 
Join Date: Jan 2005
Posts: 358
Quote:
Originally Posted by macsupergeek View Post
Any chance the LLWS can be added? Looks like the scores are posted and updated via this website - https://www.littleleague.org/world-s.../world-series/

or maybe even a scrape of this one - looking for it to say final --
https://gc.com/tmt/summer-2019/littl...cb90002195a5da

I guess since its such a temporary and small event, maybe too much work?
I won't have time to put this in place before the end of this year's tournament. I could get it in for next year, but I'll need a source that's better than just scraping a web site. Those are very likely to change and small changes can break the whole thing. All of the other monitored sports are hitting URLs that are returning some sort of structured data (usually JSON, but other formats would be viable, XML, YAML, etc.) If something like that exists for the LLWS, it would be very easy to add.

I'll add this to my list of ideas and see if I can find a data source. If anyone else knows of a source, speak up.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Plugin: Sage Recording Extender (SREv3) Slugger SageTV v7 Customizations 504 12-18-2011 08:01 PM
Sage Recording Extender (SRE) UI tmiranda Customization Announcements 0 09-09-2010 04:26 PM
Plugin: Sage Recording Extender (SRE) Slugger SageTV Customizations 428 06-19-2010 11:03 AM
Sage Recording Extender (SRE) new release notifications Slugger Customization Announcements 8 03-28-2010 07:56 AM
IMDB Plugin for Extender tonysathre SageTV Customizations 6 08-20-2008 09:15 PM


All times are GMT -6. The time now is 08:03 AM.


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