diff --git a/MMM-MyScoreboard.css b/MMM-MyScoreboard.css index e9891f0..0502b0f 100644 --- a/MMM-MyScoreboard.css +++ b/MMM-MyScoreboard.css @@ -539,8 +539,8 @@ .MMM-MyScoreboard .box-score.oneLineWithLogos.home-team-first .score.visitor { left: 182px; } -.MMM-MyScoreboard .box-score.oneLine .score.home, -.MMM-MyScoreboard .box-score.oneLineWithLogos .score.home { +.MMM-MyScoreboard .box-score.oneLine.home-team-first .score.home, +.MMM-MyScoreboard .box-score.oneLineWithLogos.home-team-first .score.home { left: 62px; } @@ -671,7 +671,9 @@ } .MMM-MyScoreboard .box-score.stacked .score, -.MMM-MyScoreboard .box-score.stackedWithLogos .score { +.MMM-MyScoreboard .box-score.stackedWithLogos .score, +.MMM-MyScoreboard .box-score.stacked.home-team-first .score, +.MMM-MyScoreboard .box-score.stackedWithLogos.home-team-first .score { left: 140px; width: 44px; color: #AAA; @@ -690,9 +692,10 @@ .MMM-MyScoreboard .box-score.stacked.home-team-first .score.visitor, .MMM-MyScoreboard .box-score.stackedWithLogos.home-team-first .score.visitor { top:30px; + right: auto; } -.MMM-MyScoreboard .box-score.stacked .score.home, -.MMM-MyScoreboard .box-score.stackedWithLogos .score.home { +.MMM-MyScoreboard .box-score.stacked.home-team-first .score.home, +.MMM-MyScoreboard .box-score.stackedWithLogos.home-team-first .score.home { top: 6px; } @@ -748,7 +751,8 @@ top: 8px; } -.MMM-MyScoreboard .box-score.stackedWithLogos .score { +.MMM-MyScoreboard .box-score.stackedWithLogos .score, +.MMM-MyScoreboard .box-score.stackedWithLogos.home-team-first .score { left: 146px; } .MMM-MyScoreboard .box-score.stackedWithLogos .score.visitor { diff --git a/MMM-MyScoreboard.js b/MMM-MyScoreboard.js index 204fbb5..fda2c94 100644 --- a/MMM-MyScoreboard.js +++ b/MMM-MyScoreboard.js @@ -522,6 +522,10 @@ Module.register("MMM-MyScoreboard",{ gameDate.subtract(1, "day"); } + //just used for debug, if you want to force a specific date + if (this.config.gameDate) { + gameDate = moment(this.config.gameDate, "YYYYMMDD"); + } var self = this; this.config.sports.forEach( function(sport, index) { diff --git a/README.md b/README.md index 5b76d22..019dd7d 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ Currently this module supports the following leagues: * **CFL** - Canadian Football League * **NCAAF** - NCAA College Football (FBS Division only) * **NCAAM** - NCAA College Basketball (Division I) -* **NCAAM_MM** - NCAA College Basketball (March Madness Tournament +* **NCAAM_MM** - NCAA College Basketball (March Madness Tournament) * **EPL** - English Premier League Soccer * **BRAS** - Brazilian League 1 Soccer diff --git a/providers/ESPN.js b/providers/ESPN.js index 4600457..c92761e 100644 --- a/providers/ESPN.js +++ b/providers/ESPN.js @@ -254,7 +254,7 @@ module.exports = { break; case "28": //SOCCER gameState = 2; - status.push("Final" + self.getFinalOT(league, game.status.period)); + status.push("Full Time" + self.getFinalOT(league, game.status.period)); break; default: //Anything else, treat like a game that hasn't started yet gameState = 0; @@ -375,6 +375,13 @@ module.exports = { return (p - 4) + "OT"; } break; + case "EPL": + case "BRAS": + if (p == 3) { + return "OT"; + } else if (p > 3) { + return (p - 2) + "OT"; + } } return this.getOrdinal(p); }, @@ -391,9 +398,14 @@ module.exports = { return " (" + (p - 4) + "OT)"; } break; + case "EPL": + case "BRAS": + if (p > 2) { + return " (OT)"; + } } return ""; - } + }, diff --git a/providers/SNET.js b/providers/SNET.js index 855e1eb..72d69c7 100644 --- a/providers/SNET.js +++ b/providers/SNET.js @@ -19,7 +19,7 @@ All sports are provided in a single feed at - http://www.sportsnet.ca/wp-content/uploads/scoreboard.json + http://www.sportsnet.ca/wp-content/files/scoreboard.json The feed takes no parameters. It returns all of today's games, yesterday's finals up until noon Eastern time, and upcoming @@ -330,6 +330,12 @@ module.exports = { break; } + /* + URLs to logo images are available in the feed, but they are a bit too low + quaity for some of the templates. However, logos are available at higher + resolution if we replace "59x59" with "200x200" in the path. + */ + var formattedGame = { classes: classes, gameMode: gameState, @@ -339,7 +345,9 @@ module.exports = { vTeamLong: game.visiting_team_short == "TBD" ? "TBD" : self.titleCase(game.visiting_team), hScore: game.home_score, vScore: game.visiting_score, - status: status + status: status, + hTeamLogoUrl: game.home_team_logo_url ? game.home_team_logo_url.replace("59x59","200x200") : "", + vTeamLogoUrl: game.visiting_team_logo_url ? game.visiting_team_logo_url.replace("59x59","200x200") : "" }; formattedGames.push(formattedGame);