Skip to content

Commit

Permalink
[script.video.nfl.gamepass] 2023.07.05
Browse files Browse the repository at this point in the history
  • Loading branch information
jm-duke committed Jul 5, 2023
1 parent 59c7e32 commit 8c3e7f8
Show file tree
Hide file tree
Showing 12 changed files with 118 additions and 24 deletions.
13 changes: 13 additions & 0 deletions script.video.nfl.gamepass/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# All good things come to an end

After retiring NFL Gamepass Domestic in 2022, the NFL decided to shutdown the international Gamepass service
as well in 2023, rendering this add-on obsolete.

Outside of the States, DAZN is the new home for the NFL Gamepass service. You can watch the games with a DAZN
account and an NFL Gamepass subscription.

The good news is that there is a DAZN add-on available for Kodi, so it is still possible to watch NFL games on our
most favorite media center.

---

# NOTE #

This addon supports NFL Game Pass, which is a merger of previous
Expand Down
16 changes: 8 additions & 8 deletions script.video.nfl.gamepass/addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.video.nfl.gamepass"
name="NFL Game Pass"
version="2022.05.14"
version="2023.07.05"
provider-name="Alexqw,divingmule,BaumSchorle,eriksoderblom,kaileu,emilsvennesson,baardisk,Duke">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
Expand All @@ -15,17 +15,17 @@
<extension point="xbmc.addon.metadata">
<summary lang="en_GB">NFL Game Pass</summary>
<description lang="en_GB">Watch NFL Game Pass streams.</description>
<lifecyclestate type="broken" lang="en_GB">The NFL canceled the NFL Gamepass service, rendering this add-on obsolete.</lifecyclestate>
<platform>all</platform>
<language>en</language>
<license>GPL-2.0-only</license>
<source>https://github.com/pigskin/kodi-gamepass</source>
<disclaimer lang="en_GB">This addon requires you to have a subscription to NFL Game Pass.[CR]Please note that these subscriptions are region restricted by the NFL.[CR]This addon is completely unofficial and is /not/ endorsed by the NFL in any way.</disclaimer>
<news>2022.05.14
+ Adapt to API changes implemented by Diva (jm-duke)
+ Fix issue with LV Raiders logo (jm-duke)
+ Fix display of 'None' for focused games in game week view (jm-duke)
+ Implemented some improvements highlighted by Bas Rieter (jm-duke)
+ Minor refactorings (jm-duke)
<disclaimer lang="en_GB">The NFL canceled the NFL Gamepass service, rendering this add-on obsolete.</disclaimer>
<news>2023.07.05
+ Mark add-on as broken, NFL has canceled the Gamepass service (jm-duke)
+ Show date (or weekday) of game (AleXSR700)
+ Toggle display of current week's games (jm-duke)
+ Implement workaround for failed content URL retrieval (jm-duke)
</news>
<assets>
<icon>resources/art/icon.png</icon>
Expand Down
13 changes: 13 additions & 0 deletions script.video.nfl.gamepass/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
2023.07.05 -- Farewell Edition
+ Mark add-on as broken, NFL has canceled the Gamepass service (jm-duke)
+ Show date (or weekday) of game (AleXSR700)
+ Toggle display of current week's games (jm-duke)
+ Implement workaround for failed content URL retrieval (jm-duke)

2022.11.14 -- Aaron Rodgers Edition
+ Fix open settings from app bug (ohhmyy)
+ Use updated team logos (ohhmyy)
+ Remove code for fixed bitrates - adaptive is default (jm-duke)
+ Add busy dialog to NFL Network (ohhmyy)
+ Fix issue with recent NFL API change (jm-duke)

2022.05.14 -- Drew Brees Edition
+ Adapt to API changes implemented by Diva (jm-duke)
+ Fix issue with LV Raiders logo (jm-duke)
Expand Down
31 changes: 20 additions & 11 deletions script.video.nfl.gamepass/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,13 @@ def display_weeks_games(self):
listitem.setProperty('is_game', 'true')
listitem.setProperty('is_show', 'false')

if addon.getSetting('time_notation') == '0': # 12-hour clock
datetime_format = '%A, %b %d - %I:%M %p'
else: # 24-hour clock
datetime_format = '%A, %b %d - %H:%M'

datetime_obj = self.gp.nfldate_to_datetime(game['gameDateTimeUtc'], True)

if game['phase'] == 'FINAL' or game['phase'] == 'FINAL_OVERTIME':
# show game duration only if user wants to see it
if addon.getSetting('hide_game_length') == 'false' and game['video']:
Expand All @@ -280,16 +287,16 @@ def display_weeks_games(self):
game['phase'],
str(timedelta(seconds=int(float(game['video']['videoDuration'].replace(',', '.'))))))
else:
game_info = game['phase']
if addon.getSetting('hide_game_length') == 'true' and game_info == 'FINAL_OVERTIME':
game_info = 'FINAL'
if addon.getSetting('display_datetime') == 'true':
if addon.getSetting('hide_game_length') == 'true' and game['phase'] != 'FINAL':
game_info = 'FINAL' + '\n' + '(' + datetime_obj.strftime(datetime_format) +')'
else:
game_info = game['phase'] + '\n' + '(' + datetime_obj.strftime(datetime_format) +')'
else:
game_info = game['phase']
if addon.getSetting('hide_game_length') == 'true' and game['phase'] != 'FINAL':
game_info = 'FINAL'
else:
if addon.getSetting('time_notation') == '0': # 12-hour clock
datetime_format = '%A, %b %d - %I:%M %p'
else: # 24-hour clock
datetime_format = '%A, %b %d - %H:%M'

datetime_obj = self.gp.nfldate_to_datetime(game['gameDateTimeUtc'], True)
game_info = datetime_obj.strftime(datetime_format)

if game['videoStatus'] == 'SCHEDULED':
Expand Down Expand Up @@ -490,11 +497,13 @@ def onClick(self, controlId): # pylint: disable=invalid-name

try:
self.display_seasons_weeks()
self.display_weeks_games()
if addon.getSetting('display_current_week') == 'true':
self.display_weeks_games()
except Exception as e:
logger.debug('Error while reading seasons weeks and games')
logger.debug('Trace Message:\n{}'.format(format_exc()))
elif controlId == 130:
xbmc.executebuiltin('ActivateWindow(busydialognocancel)')
self.main_selection = 'NFL Network'
self.window.setProperty('NW_clicked', 'true')
self.window.setProperty('GP_clicked', 'false')
Expand All @@ -509,7 +518,7 @@ def onClick(self, controlId): # pylint: disable=invalid-name

self.live_list.addItems(self.live_items)
self.display_nfln_seasons()

xbmc.executebuiltin('Dialog.Close(busydialognocancel)')
return

if self.main_selection == 'GamePass':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ msgctxt "#30030"
msgid "Display/Video"
msgstr "Anzeige"

msgctxt "#30031"
msgid "Load and display games of current week"
msgstr "Zeige die Spiele der aktuellen Woche"

msgctxt "#30032"
msgid "Coaches Film"
msgstr ""
Expand Down Expand Up @@ -152,3 +156,7 @@ msgstr "Bitte geben Sie Benutzernamen und Passwort für Ihr NFL Game Pass Abo ei
msgctxt "#30051"
msgid "Inputstream Adaptive is not installed or is disabled."
msgstr "Inputstream Adaptive ist nicht installiert oder nicht aktiviert."

msgctxt "#30052"
msgid "Display date and time of kickoff"
msgstr "Zeige das Datum und die Uhrzeit des Kickoffs an"
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ msgctxt "#30030"
msgid "Display/Video"
msgstr ""

msgctxt "#30031"
msgid "Load and display games of current week"
msgstr ""

msgctxt "#30032"
msgid "Coaches Film"
msgstr ""
Expand Down Expand Up @@ -152,3 +156,7 @@ msgstr ""
msgctxt "#30051"
msgid "Inputstream Adaptive is not installed or is disabled."
msgstr ""

msgctxt "#30052"
msgid "Display date and time of kickoff"
msgstr ""
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ msgctxt "#30030"
msgid "Display/Video"
msgstr "デイスプレイ・ビデオ"

msgctxt "#30031"
msgid "Load and display games of current week"
msgstr ""

msgctxt "#30032"
msgid "Coaches Film"
msgstr "監督フィルム集"
Expand Down Expand Up @@ -153,3 +157,7 @@ msgstr ""
msgctxt "#30051"
msgid "Inputstream Adaptive is not installed or is disabled."
msgstr ""

msgctxt "#30052"
msgid "Display date and time of kickoff"
msgstr ""
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ msgctxt "#30030"
msgid "Display/Video"
msgstr "Weergave/Video"

msgctxt "#30031"
msgid "Load and display games of current week"
msgstr ""

msgctxt "#30032"
msgid "Coaches Film"
msgstr "Coaches Film"
Expand Down Expand Up @@ -152,3 +156,7 @@ msgstr "Vul de gebruikersnaam en wachtwoord in van uw NFL Game Pass abonnement."
msgctxt "#30051"
msgid "Inputstream Adaptive is not installed or is disabled."
msgstr ""

msgctxt "#30052"
msgid "Display date and time of kickoff"
msgstr ""
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ msgid "Display/Video"
msgstr "Воспроизведение/Видео"

msgctxt "#30031"
msgid "Advanced"
msgstr "Продвинутые"
msgid "Load and display games of current week"
msgstr ""

msgctxt "#30032"
msgid "Coaches Film"
Expand Down Expand Up @@ -156,3 +156,7 @@ msgstr ""
msgctxt "#30051"
msgid "Inputstream Adaptive is not installed or is disabled."
msgstr ""

msgctxt "#30052"
msgid "Display date and time of kickoff"
msgstr ""
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ msgid "Display/Video"
msgstr "Відображення/Відео"

msgctxt "#30031"
msgid "Advanced"
msgstr "Просунуті"
msgid "Load and display games of current week"
msgstr ""

msgctxt "#30032"
msgid "Coaches Film"
Expand Down Expand Up @@ -156,3 +156,7 @@ msgstr ""
msgctxt "#30051"
msgid "Inputstream Adaptive is not installed or is disabled."
msgstr ""

msgctxt "#30052"
msgid "Display date and time of kickoff"
msgstr ""
5 changes: 4 additions & 1 deletion script.video.nfl.gamepass/resources/lib/pigskin/pigskin.py
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,10 @@ def _get_diva_streams(self, video_id, diva_config_url):
except Exception as e:
raise e

streams[vs_format] = data['ContentUrl'] + '|' + urlencode(m3u8_header)
if isinstance(data, dict) and 'ContentUrl' in data:
streams[vs_format] = data['ContentUrl'] + '|' + urlencode(m3u8_header)
else:
continue

return streams

Expand Down
16 changes: 16 additions & 0 deletions script.video.nfl.gamepass/resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,22 @@
<level>0</level>
<default>false</default>
<control type="toggle"/>
<dependencies>
<dependency type="enable" operator="!is" setting="display_datetime">true</dependency>
</dependencies>
</setting>
<setting help="" id="display_datetime" label="30052" type="boolean">
<level>0</level>
<default>false</default>
<control type="toggle"/>
<dependencies>
<dependency type="enable" operator="is" setting="hide_game_length">true</dependency>
</dependencies>
</setting>
<setting help="" id="display_current_week" label="30031" type="boolean">
<level>0</level>
<default>true</default>
<control type="toggle"/>
</setting>
</group>
</category>
Expand Down

0 comments on commit 8c3e7f8

Please sign in to comment.