Skip to content

Commit 1c62107

Browse files
authored
Prepare new version (#5)
1 parent 1fc14e4 commit 1c62107

File tree

6 files changed

+9
-17
lines changed

6 files changed

+9
-17
lines changed

CHANGELOG.md

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
# MMM-NHL Changelog
22

3-
## [Unreleased]
3+
## [2.5.1]
44

55
### Fixed
66

7-
### Added
8-
9-
### Changed
10-
11-
- Update workflows.
12-
- Update devDependencies.
13-
- Update lint process.
14-
- Lint files.
15-
16-
### Removed
7+
- Fixed display of postponed games with the new NHL API.
178

189
## [2.5.0]
1910

node_helper.js

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const BASE_PLAYOFF_URL = 'https://api-web.nhle.com/v1/playoff-series/carousel';
4040
* @property {string} timestamp - Start date of the game in UTC timezone.
4141
* @property {string} gameDay - Game day in format YYYY-MM-DD in north american timezone.
4242
* @property {string} gameState - Contains information about the game status, e.g. OFF, LIVE, CRIT, FUT.
43+
* @property {string} gameScheduleState - Contains specialized information about the scheduling of this game, e.g. OK, PPD (postponed)
4344
* @property {Team} awayTeam - Contains information about the away team.
4445
* @property {Team} homeTeam - Contains information about the home team.
4546
* @property {object} periodDescriptor - Contains information about the period of play of the game. Is present on all games, past, present, and future.
@@ -421,6 +422,7 @@ module.exports = NodeHelper.create({
421422
timestamp: game.startTimeUTC,
422423
gameDay: game.gameDay,
423424
status: game.gameState,
425+
scheduleStatus: game.gameScheduleState,
424426
teams: {
425427
away: this.parseTeam(game.awayTeam),
426428
home: this.parseTeam(game.homeTeam),

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mmm-nhl",
3-
"version": "2.5.0",
3+
"version": "2.5.1",
44
"description": "National Hockey League Module for MagicMirror²",
55
"scripts": {
66
"docs": "jsdoc -c jsdoc.json .",

templates/MMM-NHL.njk

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
<td>
2222
{% if games[index].status === "PRE" %}
2323
{{ "PRE_GAME" | translate }}
24-
{# TODO: Find out what the state postponed state is in the new API #}
25-
{% elif games[index].status === "Postponed" %}
24+
{% elif games[index].scheduleStatus === "PPD" %}
2625
{{ "POSTPONED" | translate }}
2726
{% elif games[index].status === "FUT" %}
2827
{{ games[index] | formatStartDate }}

translations/en.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"FINAL_OT": "Final (OT)",
1212
"FINAL_SO": "Final (SO)",
1313
"TIME_LEFT": "{TIME} left",
14-
"POSTPONED": "PPD",
14+
"POSTPONED": "Postponed",
1515
"SERIES": "Series"
1616
}

0 commit comments

Comments
 (0)