Kodi Community Forum
Release NHL TV™ - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Video Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=154)
+---- Thread: Release NHL TV™ (/showthread.php?tid=243756)



RE: NHL TV™ - eastwood - 2022-10-28

Having the same issue here - any way around this?


RE: NHL TV™ - christophlitwinski - 2022-10-29

Hi eracknaphobia,

since the start of 2022-23 season I cannot login anymore. In the stable 2021 version running on KODI 19.3 I am told I do not have a valid subscription. Trying it in the current beta version I get the message:
Login Error: The data given was invalid.

I tried my email address and my username which I used last season in both versions of the add-on.

Do you have any ideas? The subscription works fine in webbrowsers.

Chris


RE: NHL TV™ - ferdo22 - 2022-10-30

Same here!


RE: NHL TV™ - sailort - 2022-10-30

Did anyone noticed that audio streams are single channel mono? They've screwed this nhl.tv service big time. No pre-games, bad quality streams, incomplete replays, audio not usable...


RE: NHL TV™ - feerlessleadr - 2022-10-30

It looks like eraknaphobia is aware of the issue (see here), but needs some help to get past it.


RE: NHL TV™ - Sweeney_himself - 2022-11-01

it's weird because I do not need to go through Captcha when I login to the normal NHL.tv through webbrowser.

but without having any clue about programming: could it somehow be an option, that one needs to be logged in in the background on NHL.tv app or webbrowser and with that done starting Kodi and the NHL.tv addon?
so that the login-process looks different?

just thinking out loud Big Grin


RE: NHL TV™ - paulus7 - 2022-11-02

Hello.

I know it's for sure a stupid question for some...

Is the a direct link to beta zip file of plugin.video.nhlgcl ?

Best regards

Gilles


RE: NHL TV™ - junkmarsh - 2022-11-05

(2022-11-02, 23:42)paulus7 Wrote: Hello.

I know it's for sure a stupid question for some...

Is the a direct link to beta zip file of plugin.video.nhlgcl ?

Best regards

Gilles
I don't know which version the beta is, but releases are at https://github.com/eracknaphobia/plugin.video.nhlgcl/releases


RE: NHL TV™ - feerlessleadr - 2022-11-05

(2022-11-02, 23:42)paulus7 Wrote: Hello.

I know it's for sure a stupid question for some...

Is the a direct link to beta zip file of plugin.video.nhlgcl ?

Best regards

Gilles

There is a direct link in the 1st post. The addon is currently broken however since the NHL changed their login process.


RE: NHL TV™ - juggie - 2022-11-08

Had a look at this.  The android app (NHL.TV app, not on the USA/Canada playstore!) uses a different hostname with the same API.  The login process only uses username/password, the other keys (code/gCapchaResponse) are not included in the request from the app.  The user agent is 'okhttp/4.9.3'.

Here's a quick patch:
python:

diff --git a/resources/lib/nhl_tv.py b/resources/lib/nhl_tv.py
index e4419fa..0003098 100644
--- a/resources/lib/nhl_tv.py
+++ b/resources/lib/nhl_tv.py
@@ -23,7 +23,7 @@ def todays_games(game_day):
addPlaylist(date_display, display_day, '/playhighlights', 900, ICON, FANART)


- url = "https://nhltv.nhl.com/api/v2/events" \
+ url = "https://nhl.spott2.sportradar.com/api/v2/events" \
f"?date_time_from={game_day}T00:00:00-04:00" \
f"&date_time_to={next_day.strftime('%Y-%m-%d')}T00:00:00-04:00" \
"&sort_direction=asc"
@@ -83,7 +83,7 @@ def stream_select(home_id, away_id, highlight_id):
xbmcplugin.setResolvedUrl(addon_handle, True, listitem)

def update_user_token():
- url = "https://nhltv.nhl.com/api/v3/cleeng/user"
+ url = "https://nhl.spott2.sportradar.com/api/v3/cleeng/user"
headers = {'User-Agent': UA_PC}
r = requests.get(url, headers=headers, cookies=load_cookies(), verify=VERIFY)
if r.ok:
@@ -106,7 +106,7 @@ def login():
settings.setSetting(id='password', value=PASSWORD)

if USERNAME != '' and PASSWORD != '':
- url = 'https://nhltv.nhl.com/api/v3/sso/nhl/sign-in'
+ url = 'https://nhl.spott2.sportradar.com/api/v3/sso/nhl/sign-in'
headers = {
"Accept": "application/json, text/plain, */*",
"User-Agent": UA_PC,
@@ -114,9 +114,7 @@ def login():
}

login_data = {"email":USERNAME,
- "password"TongueASSWORD,
- "code":None,
- "gCaptchaResponse":None
+ "password"TongueASSWORD
}

r = requests.post(url, headers=headers, json=login_data, cookies=load_cookies(), verify=VERIFY)
diff --git a/resources/lib/stream.py b/resources/lib/stream.py
index fb044bd..19a1428 100644
--- a/resources/lib/stream.py
+++ b/resources/lib/stream.py
@@ -3,7 +3,7 @@ from resources.lib.globals import *
class Stream:
id = ""
auth_code = ""
- content_url = "https://nhltv.nhl.com/api/v3/contents/"
+ content_url = "https://nhl.spott2.sportradar.com/api/v3/contents/"

def __init__(self,id):
self.id = id



RE: NHL TV™ - juggie - 2022-11-08

I should add I'm well aware the host name looks 'odd'.  Don't take my word for it.  Grab the NHL.TV App (https://play.google.com/store/apps/details?id=ott.nhl) and have a look at the traffic in whatever way works for you (dns requests, pcap, mitm, etc).


RE: NHL TV™ - feerlessleadr - 2022-11-08

(2022-11-08, 03:43)juggie Wrote: Had a look at this.  The android app (NHL.TV app, not on the USA/Canada playstore!) uses a different hostname with the same API.  The login process only uses username/password, the other keys (code/gCapchaResponse) are not included in the request from the app.  The user agent is 'okhttp/4.9.3'.

Here's a quick patch:
python:

diff --git a/resources/lib/nhl_tv.py b/resources/lib/nhl_tv.py
index e4419fa..0003098 100644
--- a/resources/lib/nhl_tv.py
+++ b/resources/lib/nhl_tv.py
@@ -23,7 +23,7 @@ def todays_games(game_day):
addPlaylist(date_display, display_day, '/playhighlights', 900, ICON, FANART)


- url = "https://nhltv.nhl.com/api/v2/events" \
+ url = "https://nhl.spott2.sportradar.com/api/v2/events" \
f"?date_time_from={game_day}T00:00:00-04:00" \
f"&date_time_to={next_day.strftime('%Y-%m-%d')}T00:00:00-04:00" \
"&sort_direction=asc"
@@ -83,7 +83,7 @@ def stream_select(home_id, away_id, highlight_id):
xbmcplugin.setResolvedUrl(addon_handle, True, listitem)

def update_user_token():
- url = "https://nhltv.nhl.com/api/v3/cleeng/user"
+ url = "https://nhl.spott2.sportradar.com/api/v3/cleeng/user"
headers = {'User-Agent': UA_PC}
r = requests.get(url, headers=headers, cookies=load_cookies(), verify=VERIFY)
if r.ok:
@@ -106,7 +106,7 @@ def login():
settings.setSetting(id='password', value=PASSWORD)

if USERNAME != '' and PASSWORD != '':
- url = 'https://nhltv.nhl.com/api/v3/sso/nhl/sign-in'
+ url = 'https://nhl.spott2.sportradar.com/api/v3/sso/nhl/sign-in'
headers = {
"Accept": "application/json, text/plain, */*",
"User-Agent": UA_PC,
@@ -114,9 +114,7 @@ def login():
}

login_data = {"email":USERNAME,
- "password"TongueASSWORD,
- "code":None,
- "gCaptchaResponse":None
+ "password"TongueASSWORD
}

r = requests.post(url, headers=headers, json=login_data, cookies=load_cookies(), verify=VERIFY)
diff --git a/resources/lib/stream.py b/resources/lib/stream.py
index fb044bd..19a1428 100644
--- a/resources/lib/stream.py
+++ b/resources/lib/stream.py
@@ -3,7 +3,7 @@ from resources.lib.globals import *
class Stream:
id = ""
auth_code = ""
- content_url = "https://nhltv.nhl.com/api/v3/contents/"
+ content_url = "https://nhl.spott2.sportradar.com/api/v3/contents/"

def __init__(self,id):
self.id = id

Will you be submitting a PR for this on erak's github? Does this fix the login issue?


RE: NHL TV™ - juggie - 2022-11-09

Yes this fixes the login issue.


RE: NHL TV™ - feerlessleadr - 2022-11-11

@juggie Apologies but I'm trying to apply your diff to a local cloned copy of the beta repo, and  I'm getting an error that says "error: corrupt patch at line 6"

Here is what I ran:

kevin@ubuntu-server:~/nhl-kodi$ git clone https://github.com/eracknaphobia/plugin.video.nhlgcl.git
Cloning into 'plugin.video.nhlgcl'...
remote: Enumerating objects: 2137, done.
remote: Counting objects: 100% (292/292), done.
remote: Compressing objects: 100% (128/128), done.
remote: Total 2137 (delta 183), reused 250 (delta 154), pack-reused 1845
Receiving objects: 100% (2137/2137), 27.04 MiB | 46.38 MiB/s, done.
Resolving deltas: 100% (690/690), done.
kevin@ubuntu-server:~/nhl-kodi$ ls
plugin.video.nhlgcl
kevin@ubuntu-server:~/nhl-kodi$ cd plugin.video.nhlgcl/
kevin@ubuntu-server:~/nhl-kodi/plugin.video.nhlgcl$ ls
addon.py  addon.xml  fanart.jpg  icon.png  LICENSE.txt  README.md  resources
kevin@ubuntu-server:~/nhl-kodi/plugin.video.nhlgcl$ nano fix.diff
kevin@ubuntu-server:~/nhl-kodi/plugin.video.nhlgcl$ git apply fix.diff
error: corrupt patch at line 6

I'm not a git expert or anything, just following directions on how to apply a diff based on a google search. Thanks

::edit:: I just tried patch instead of apply and got a simialr error:

kevin@ubuntu-server:~/nhl-kodi/plugin.video.nhlgcl$ patch -p1 < fix.diff
patching file resources/lib/nhl_tv.py
patch: **** malformed patch at line 6: addPlaylist(date_display, display_day, '/playhighlights', 900, ICON, FANART)


RE: NHL TV™ - juggie - 2022-11-12

The forum messed a few things up. (It strips out : P for some reason with no space despite it being in a code block)

Just swap the host names. I'll post a Pastebin in a bit.