Skip to content

Commit

Permalink
fix games missing (OT field)
Browse files Browse the repository at this point in the history
  • Loading branch information
egates committed May 17, 2021
1 parent 7042600 commit 0dd2e95
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
5 changes: 2 additions & 3 deletions addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.nhlgcl" name="NHL TV™" version="2021.3.23" provider-name="eracknaphobia">
<addon id="plugin.video.nhlgcl" name="NHL TV™" version="2021.5.17" provider-name="eracknaphobia">
<requires>
<import addon="xbmc.python" version="2.24.0"/>
<import addon="script.module.pytz" />
Expand All @@ -20,8 +20,7 @@
restrictions apply, including national blackouts.
</disclaimer>
<news>
- Fix for past game not showing in Kodi 19 (thanks mrawji)
- Squashed some bugs and other minor fixes
- Fix games not showing up because OT field missing
</news>
<language>en</language>
<platform>all</platform>
Expand Down
12 changes: 8 additions & 4 deletions resources/lib/nhl_tv.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,14 @@ def create_game_listitem(game, game_day, show_date=False):
else:
name = '%s %s - %s at %s - %s' % \
(game_line_header, away_team, game['teams']['away']['score'], home_team, game['teams']['home']['score'])

desc = '%s %s-%s-%s\n%s %s-%s-%s' % (away_team, str(away_record['wins']), str(away_record['losses']),
str(away_record['ot']), home_team, str(home_record['wins']),
str(home_record['losses']), str(home_record['ot']))
away_wins = away_record['wins'] if 'wins' in away_record else '0'
away_losses = away_record['losses'] if 'losses' in away_record else '0'
away_ot = away_record['ot'] if 'ot' in away_record else '0'
home_wins = home_record['wins'] if 'wins' in home_record else '0'
home_losses = home_record['losses'] if 'losses' in home_record else '0'
home_ot = home_record['ot'] if 'ot' in home_record else '0'
desc = '%s %s-%s-%s\n%s %s-%s-%s' % (away_team, away_wins, away_losses, away_ot,
home_team, home_wins, home_losses, home_ot)

fanart = 'http://nhl.bamcontent.com/images/arena/default/%[email protected]' % home['id']
try:
Expand Down

0 comments on commit 0dd2e95

Please sign in to comment.