Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Games not updating #90

Open
zheinrich1 opened this issue Jun 30, 2024 · 15 comments
Open

Games not updating #90

zheinrich1 opened this issue Jun 30, 2024 · 15 comments

Comments

@zheinrich1
Copy link

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
Copy link

crcowan commented Jun 30, 2024

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

@Dysantic
Copy link

Dysantic commented Jul 1, 2024

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.

Dysantic added a commit to Dysantic/MMM-MyScoreboard that referenced this issue Jul 1, 2024
As per "Games not updating jclarke0000#90", the hostname for the ticker API was changed by Sportsnet from "mobile-statsv2.sportsnet.ca" to "stats-api.sportsnet.ca". This pull request fixes that.
@crcowan
Copy link

crcowan commented Jul 1, 2024 via email

@dathbe
Copy link

dathbe commented Jul 1, 2024

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.

@ChrisRG711
Copy link

that fixed me!!! Thank you a ton

@zheinrich1
Copy link
Author

i appreciate the super quick help. i was unable to find the time to try it out, but today i spent quite a bit of time on it, and it would not work by manually editing the file. i dont know if something else needed to be done as well. but i ended up deleting the MMM-MyScoreboard directory and reinstalling it via @Dysantic 's fork.

A funny story for you all, i accidentally did git pull -rebase MMM-MyScoreboard in the MagicMirror folder. what a mess. what a terrible mess. git reset --hard ORIG_HEAD fixed it luckily but then i had to npm install again in the MM folder which took forever and i thought it was broken. long story short is that git clone is what im supposed to use, not git pull lol

anyways, i will close the issue as i confirmed tonight via the Phillies game info that it is now working with your guys' help. much appreciated

@dathbe
Copy link

dathbe commented Jul 21, 2024

  1. we’ve found a fix, but it hasn’t been merged into the main branch. I don’t know the protocol, but maybe leave the issue open in case someone else is looking for the solution?

  2. when the manual edit wasn’t working, did you ‘npm install’ and restart MagicMirror? Some things don’t get picked up by the browser without a restart.

@zheinrich1 zheinrich1 reopened this Jul 21, 2024
@zheinrich1
Copy link
Author

sounds good, ill reopen it. I wasnt aware that it went to a different location when closed.

Thinking back, i think my issue was when i edited the file, i copied and pasted the url in, but deleted the "https://" and only copied over the rest. maybe that was it, maybe not. The mirror i did it on has been untouched for a while so i havent updated anything in a long time.

however, the second mirror in my house, worked right away when i manually did it. didnt need to reboot it or anything.

thanks again for all the help.

@yguns31
Copy link

yguns31 commented Aug 5, 2024

FYI, it appears there is a change in the functionality to the new URL. It only shows MLB games. If you want to see scores for any other leagues, you need to append 'league=NFL' to the querystring. This may break how the module functions.

@sanj926
Copy link

sanj926 commented Aug 11, 2024

UGH. Just noticed it’s only working for MLB games. What do I need to do to get it to work with NFL and NCAAF?

@snp66
Copy link

snp66 commented Aug 15, 2024

Is the pointer to the old api not working now? I’ve not changed anything and again scores are not updating. I’ve tried changing to a different source but the score is processed as a soccer or basketball game so the innings don’t display properly.

@sanj926
Copy link

sanj926 commented Aug 15, 2024

Just checked and the new api is only showing MLB. There is an NFL game today that is not showing up at all. The old apinshows the games but doesn’t update the scores.

@snp66
Copy link

snp66 commented Aug 16, 2024

ESPN has the scores but the code isn’t setup to parse MLB from the ESPN API. At least that’s what it appeared to me when I tried it. I’m far from an expert though.

@sanj926
Copy link

sanj926 commented Aug 16, 2024

Well, the problem is that it’s not pulling in any of the NFL games on the newer api. So it only pulls in the MLB games. The old API pulls in the right games but doesn’t update the scores.

@sigel
Copy link

sigel commented Aug 26, 2024

FYI, it appears there is a change in the functionality to the new URL. It only shows MLB games. If you want to see scores for any other leagues, you need to append 'league=NFL' to the querystring. This may break how the module functions.

This works, and you can add multiple like league=MLB,NFL

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

However this introduces a new issue mentioned in the code comments in SNET.js where games for the next day show as of 7:00PM est, and scores from yesterdays NFL games are still showing for me as well. Hopefully someone with more js experience can provider a true fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants