2014-10-10, 14:40
Good to hear Carb0! Thanks for all the hard work and time you have already put forth into this add-on. It is a great one indeed for us crazy hockey fanatics out here.
(2014-10-10, 15:50)SparkGFX Wrote: amd7674 - If you have Google Play Store installed on your FireTV you will be able to update to the latest version of the NHL application. It is wise to use a keyboard/mouse combo to navigate quicker through the options. I use the Logitech K400 and it works great. When using the app, make sure you click and hold the left mouse button and swipe up or down on the pad to manuever the screen to select different games and what not. Remember, this app was intended for phones and tablets, so it functions like a phone or tablet. Also, as far as the resolution goes, use the FireTV's display settings to adjust your screen size. I had to do this on the projector when watching on the 100' in the theater room.
As for the streaming goes and quality for the NHL app on the Google Play Store, 1600kb was the highest it would let me view, I had no buffering and everything was in-sync. I was also able to use all the features such as goalie views, star player cam, home and away, and other various cams. Only problem I could see is that the app did not update scores on the scores page on the fly, but not a big deal.
Hope this helps anyone else trying to get the app to work on the FireTV.
Old login URL: https://gamecenter.nhl.com/nhlgc/secure/login
New login URL: https://account.nhl.com/app?service=login&siteId=34
Old login parameters: {'username': USERNAME, 'password': PASSWORD}
New login parameters: {'userType': 'REGISTERED_FAN', 'username': USERNAME, 'password': PASSWORD}
POST to http://gamecenter.nhl.com/nhlgc/servlets/games
Cookies required: none
Parameters:
format: xml
Response:
<?xml version="1.0" encoding="UTF-8"?>
<result>
<currentDate>2014-10-10T13:08:02.145</currentDate>
<games>
<game>
<gid>NUMERIC GAME ID</gid>
<season>2014</season>
<type>2</type>
<id>NUMERIC UNIQUE ID</id>
<date>2014-10-08T19:23:00.000</date>
<gameTimeGMT>2014-10-08T23:23:00.000</gameTimeGMT>
<gameEndTimeGMT>2014-10-09T01:56:41.000</gameEndTimeGMT>
<awayTeam>MON</awayTeam>
<homeTeam>TOR</homeTeam>
<hasProgram>true</hasProgram>
<awayTeam>MON</awayTeam>
<awayGoals>4</awayGoals>
<homeTeam>TOR</homeTeam>
<homeGoals>3</homeGoals>
<date>2014-10-08T19:23:00.000</date>
<program>
<gid>10574</gid>
<id></id>
<publishPoint><![CDATA[adaptive:<URL removed since I'm unsure if it's an account specific URL>]]></publishPoint>
<formats>0</formats>
</program>
</game>
<game>
<gid>NUMERIC GAME ID</gid>
<season>2014</season>
<type>2</type>
<id>NUMERIC UNIQUE ID</id>
<date>2014-10-08T19:30:23.000</date>
<gameTimeGMT>2014-10-08T23:30:23.000</gameTimeGMT>
<gameEndTimeGMT>2014-10-09T02:04:09.000</gameEndTimeGMT>
<awayTeam>PHI</awayTeam>
<homeTeam>BOS</homeTeam>
<blocked>true</blocked>
</game>
// Omitted the rest of the games for brevity.
</games>
</result>
Alternatively, you can limit the listings to (I guess?) just today's game(s) by doing:
Parameters:
format: xml
app: true
Response:
<?xml version="1.0" encoding="UTF-8"?>
<result>
<currentDate>2014-10-10T12:33:57.017</currentDate>
<games>
<game>
<gid>NUMERIC GAME ID</gid>
<season>2014</season>
<type>2</type>
<id>NUMERIC UNIQUE ID</id>
<date>2014-10-10T19:00:00.000</date>
<gameTimeGMT>2014-10-10T23:00:00.000</gameTimeGMT>
<awayTeam>NYI</awayTeam>
<homeTeam>CAR</homeTeam>
</game>
</games>
</result>
def LIVE(url,name):
#Download live.xml
http = httplib2.Http()
try:
cookies = open(os.path.join(ROOTDIR, "cookies")).readline()
except IOError:
login()
cookies = open(os.path.join(ROOTDIR, "cookies")).readline()
url = 'http://gamecenter.nhl.com/nhlgc/servlets/games'
body = {'format': 'xml'}
headers = {'Content-type': 'application/x-www-form-urlencoded', 'Cookie': cookies}
response, content = http.request(url, 'POST', headers=headers, body=urllib.urlencode(body))
#Save the xml file
saveFile("xml/live.xml",content)
#Load the xml file
xmlPath = os.path.join(ROOTDIR, "xml/live.xml")
xml = parse(xmlPath)
games = xml.getElementsByTagName('game')
#Get teamnames
teams = getTeams()
for game in games:
#Setup variables
awayTeam = teams[game.getElementsByTagName('awayTeam')[0].childNodes[0].nodeValue][TEAMNAME]
homeTeam = teams[game.getElementsByTagName('homeTeam')[0].childNodes[0].nodeValue][TEAMNAME]
program = game.getElementsByTagName('program')
title = homeTeam + ' vs ' + awayTeam
if len(program) != 0:
url = program[0].getElementsByTagName('publishPoint')[0].childNodes[0].nodeValue
url = url.replace('adaptive', 'http').replace('whole_1_pc.mp4', 'whole_1_3000.mp4')
addLink(title, url, title, '')
POST to http://gamecenter.nhl.com/nhlgc/servlets/games
Cookies: none
Parameters:
format: xml
app: true
Important tags in XML response:
<season>
<type>
<gid>
POST to http://gamecenter.nhl.com/nhlgc/servlets/game
Cookies: none
Parameters:
season: <season>
type: <type>
app: true
gid: <gid>
isFlex: true
Important tags in XML response:
<season>
<type>
<gid>
POST to http://gamecenter.nhl.com/nhlgc/servlets/publishpoint
Cookies: authenticated login cookies
Parameters:
type: game
gs: live
id: <season><type (with leading zero)><gid>
ft: <type> (I think)