GNJD -> NJD

This commit is contained in:
Gordon Shumway 2019-12-06 20:56:48 -05:00 committed by GitHub
parent 20867834aa
commit e8e868c601
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,8 +96,6 @@ class NHLScores(callbacks.Plugin):
team = 'all' team = 'all'
date = None date = None
else: else:
if optional_team.upper() == 'GNJD':
optional_team = 'njd'
date = self._checkDateInput(optional_team) date = self._checkDateInput(optional_team)
#print("2") #print("2")
if date: # and len(date) != 3: if date: # and len(date) != 3:
@ -330,8 +328,6 @@ class NHLScores(callbacks.Plugin):
"""Extract all relevant fields from NHL.com's json """Extract all relevant fields from NHL.com's json
and return a list of games.""" and return a list of games."""
games = [] games = []
if team.upper() == "GNJD":
team = 'NJD'
if json['totalGames'] == 0: if json['totalGames'] == 0:
return games return games
games.append(json['dates'][0]['date']) games.append(json['dates'][0]['date'])
@ -439,8 +435,8 @@ class NHLScores(callbacks.Plugin):
"MEM @ CLE 07:00 PM ET" (a game that has not started yet), "MEM @ CLE 07:00 PM ET" (a game that has not started yet),
"HOU 132 GSW 127 F OT2" (a game that ended and went to 2 overtimes), "HOU 132 GSW 127 F OT2" (a game that ended and went to 2 overtimes),
"POR 36 LAC 42 8:01 Q2" (a game in progress).""" "POR 36 LAC 42 8:01 Q2" (a game in progress)."""
away_team = 'GNJD' if 'NJD' in game['away_team'] else game['away_team'] away_team = game['away_team']
home_team = 'GNJD' if 'NJD' in game['home_team'] else game['home_team'] home_team = game['home_team']
if game['period'] == 0: # The game hasn't started yet if game['period'] == 0: # The game hasn't started yet
starting_time = game['starting_time'] \ starting_time = game['starting_time'] \
if not game['starting_time_TBD'] \ if not game['starting_time_TBD'] \
@ -495,8 +491,8 @@ class NHLScores(callbacks.Plugin):
"MEM @ CLE 07:00 PM ET" (a game that has not started yet), "MEM @ CLE 07:00 PM ET" (a game that has not started yet),
"HOU 132 GSW 127 F OT2" (a game that ended and went to 2 overtimes), "HOU 132 GSW 127 F OT2" (a game that ended and went to 2 overtimes),
"POR 36 LAC 42 8:01 Q2" (a game in progress).""" "POR 36 LAC 42 8:01 Q2" (a game in progress)."""
away_team = 'GNJD' if 'NJD' in game['away_team'] else game['away_team'] away_team = game['away_team']
home_team = 'GNJD' if 'NJD' in game['home_team'] else game['home_team'] home_team = game['home_team']
if game['period'] == 0: # The game hasn't started yet if game['period'] == 0: # The game hasn't started yet
starting_time = game['starting_time'] \ starting_time = game['starting_time'] \
if not game['starting_time_TBD'] \ if not game['starting_time_TBD'] \