jclarke0000 / MMM-MyScoreboard

Module for MagicMirror to display today's scores for your favourite teams across multiple sports.
MIT License
65 stars 31 forks source link

Games not updating #90

Open zheinrich1 opened 1 week ago

zheinrich1 commented 1 week ago

Every day the time of the games does change to the correct time, but once the game starts it doesn’t change. It will remain showing the time the game started and not update scores anymore or say final when it’s done

crcowan commented 1 week ago

It looks like the SportsNet feed is not updating during the day. It always shows scores of zero.

Dysantic commented 6 days ago

Sportsnet made a change to the hostname for the API, yet their old hostname (and the one this module uses) still has access to the "pre-game" data, which is why we still see the game time, but no live updates or post-game scores.

A quick fix is to go into the "SNET.js" file, and look for:

var url = "https://mobile-statsv2.sportsnet.ca/ticker?day=" + this.gameDate.format("YYYY-MM-DD");

Update the hostname from "mobile-statsv2.sportsnet.ca" to "stats-api.sportsnet.ca" like so:

var url = "https://stats-api.sportsnet.ca/ticker?day=" + this.gameDate.format("YYYY-MM-DD");

The API output is still formatted as the module expects, and all should work again.

crcowan commented 6 days ago

Thank you so much for the incredibly fast response. I figured it was something like this but couldn't find any documentation on the API.

I really appreciate your help,.

Regaards, Charles

------ Original Message ------ From "Dysantic" @.> To "jclarke0000/MMM-MyScoreboard" @.> Cc "crcowan" @.>; "Comment" @.> Date 6/30/2024 10:48:43 PM Subject Re: [jclarke0000/MMM-MyScoreboard] Games not updating (Issue

90)

Sportsnet made a change to the hostname for the API, yet their old hostname (and the one this module uses) still has access to the "pre-game" data, which is why we still see the game time, but no live updates or post-game scores.

A quick fix is to go into the "SNET.js" file, and look for:

var url = "https://mobile-statsv2.sportsnet.ca/ticker?day=" + this.gameDate.format("YYYY-MM-DD");

Update the hostname from "mobile-statsv2.sportsnet.ca" to "stats-api.sportsnet.ca" like so:

var url = "https://stats-api.sportsnet.ca/ticker?day=" + this.gameDate.format("YYYY-MM-DD");

The API output is still formatted as the module expects, and all should work again.

— Reply to this email directly, view it on GitHub https://github.com/jclarke0000/MMM-MyScoreboard/issues/90#issuecomment-2199065065, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJNTP45MVKSNWSALRCMYWTZKC7QXAVCNFSM6AAAAABKDUF6GWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJZGA3DKMBWGU. You are receiving this because you commented.Message ID: @.***>

dathbe commented 6 days ago

Thanks for the update, @Dysantic . I've included this change in my fork. The only other significant change is a backward-compatible option to display both yesterday's game and today's game at the same time in the morning. https://github.com/dathbe/MMM-MyScoreboard/tree/snetupdate

I've created my own fork because the owner here doesn't seem to be updating.