From 8c3e7f81d060bd474075b71a1b0dd265500dd756 Mon Sep 17 00:00:00 2001 From: Thomas Hager Date: Tue, 27 Jun 2023 23:00:13 +0200 Subject: [PATCH] [script.video.nfl.gamepass] 2023.07.05 --- script.video.nfl.gamepass/README.md | 13 ++++++++ script.video.nfl.gamepass/addon.xml | 16 +++++----- script.video.nfl.gamepass/changelog.txt | 13 ++++++++ script.video.nfl.gamepass/default.py | 31 ++++++++++++------- .../resource.language.de_de/strings.po | 8 +++++ .../resource.language.en_gb/strings.po | 8 +++++ .../resource.language.ja_jp/strings.po | 8 +++++ .../resource.language.nl_nl/strings.po | 8 +++++ .../resource.language.ru_ru/strings.po | 8 +++-- .../resource.language.uk_ua/strings.po | 8 +++-- .../resources/lib/pigskin/pigskin.py | 5 ++- .../resources/settings.xml | 16 ++++++++++ 12 files changed, 118 insertions(+), 24 deletions(-) diff --git a/script.video.nfl.gamepass/README.md b/script.video.nfl.gamepass/README.md index 09af42b8cb..195fe02e11 100644 --- a/script.video.nfl.gamepass/README.md +++ b/script.video.nfl.gamepass/README.md @@ -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 diff --git a/script.video.nfl.gamepass/addon.xml b/script.video.nfl.gamepass/addon.xml index e32ae2f3cd..3ea42ee954 100644 --- a/script.video.nfl.gamepass/addon.xml +++ b/script.video.nfl.gamepass/addon.xml @@ -1,7 +1,7 @@  @@ -15,17 +15,17 @@ NFL Game Pass Watch NFL Game Pass streams. + The NFL canceled the NFL Gamepass service, rendering this add-on obsolete. all en GPL-2.0-only https://github.com/pigskin/kodi-gamepass - 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. - 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) + The NFL canceled the NFL Gamepass service, rendering this add-on obsolete. + 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) resources/art/icon.png diff --git a/script.video.nfl.gamepass/changelog.txt b/script.video.nfl.gamepass/changelog.txt index 19a38c6c77..feabbbfbae 100644 --- a/script.video.nfl.gamepass/changelog.txt +++ b/script.video.nfl.gamepass/changelog.txt @@ -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) diff --git a/script.video.nfl.gamepass/default.py b/script.video.nfl.gamepass/default.py index b0ae155f79..5337909e23 100644 --- a/script.video.nfl.gamepass/default.py +++ b/script.video.nfl.gamepass/default.py @@ -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']: @@ -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': @@ -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') @@ -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': diff --git a/script.video.nfl.gamepass/resources/language/resource.language.de_de/strings.po b/script.video.nfl.gamepass/resources/language/resource.language.de_de/strings.po index ddb07a494f..a59ca6dee2 100644 --- a/script.video.nfl.gamepass/resources/language/resource.language.de_de/strings.po +++ b/script.video.nfl.gamepass/resources/language/resource.language.de_de/strings.po @@ -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 "" @@ -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" diff --git a/script.video.nfl.gamepass/resources/language/resource.language.en_gb/strings.po b/script.video.nfl.gamepass/resources/language/resource.language.en_gb/strings.po index eda15b610d..1933cc5124 100644 --- a/script.video.nfl.gamepass/resources/language/resource.language.en_gb/strings.po +++ b/script.video.nfl.gamepass/resources/language/resource.language.en_gb/strings.po @@ -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 "" @@ -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 "" diff --git a/script.video.nfl.gamepass/resources/language/resource.language.ja_jp/strings.po b/script.video.nfl.gamepass/resources/language/resource.language.ja_jp/strings.po index ab80862ce3..7bc7dbf9d4 100644 --- a/script.video.nfl.gamepass/resources/language/resource.language.ja_jp/strings.po +++ b/script.video.nfl.gamepass/resources/language/resource.language.ja_jp/strings.po @@ -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 "監督フィルム集" @@ -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 "" diff --git a/script.video.nfl.gamepass/resources/language/resource.language.nl_nl/strings.po b/script.video.nfl.gamepass/resources/language/resource.language.nl_nl/strings.po index 7334d658df..63d5646a4e 100644 --- a/script.video.nfl.gamepass/resources/language/resource.language.nl_nl/strings.po +++ b/script.video.nfl.gamepass/resources/language/resource.language.nl_nl/strings.po @@ -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" @@ -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 "" diff --git a/script.video.nfl.gamepass/resources/language/resource.language.ru_ru/strings.po b/script.video.nfl.gamepass/resources/language/resource.language.ru_ru/strings.po index a5fbcb2c2d..ad66d482d4 100644 --- a/script.video.nfl.gamepass/resources/language/resource.language.ru_ru/strings.po +++ b/script.video.nfl.gamepass/resources/language/resource.language.ru_ru/strings.po @@ -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" @@ -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 "" diff --git a/script.video.nfl.gamepass/resources/language/resource.language.uk_ua/strings.po b/script.video.nfl.gamepass/resources/language/resource.language.uk_ua/strings.po index e4cc17053c..be183c2f09 100644 --- a/script.video.nfl.gamepass/resources/language/resource.language.uk_ua/strings.po +++ b/script.video.nfl.gamepass/resources/language/resource.language.uk_ua/strings.po @@ -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" @@ -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 "" diff --git a/script.video.nfl.gamepass/resources/lib/pigskin/pigskin.py b/script.video.nfl.gamepass/resources/lib/pigskin/pigskin.py index 921917100d..a9699e66ed 100644 --- a/script.video.nfl.gamepass/resources/lib/pigskin/pigskin.py +++ b/script.video.nfl.gamepass/resources/lib/pigskin/pigskin.py @@ -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 diff --git a/script.video.nfl.gamepass/resources/settings.xml b/script.video.nfl.gamepass/resources/settings.xml index 6c0d4fa233..71dd58e84e 100644 --- a/script.video.nfl.gamepass/resources/settings.xml +++ b/script.video.nfl.gamepass/resources/settings.xml @@ -66,6 +66,22 @@ 0 false + + true + + + + 0 + false + + + true + + + + 0 + true +