fewieden / MMM-soccer

European Soccer Standings Module for MagicMirror²
MIT License
31 stars 24 forks source link

Icon downloader needs fix to use v2 of api & problems with focus_on #26

Closed Heiner92 closed 3 years ago

Heiner92 commented 5 years ago

Platform (Hardware/OS): Raspberry Pi 3 Node version: ? MagicMirror version: 2.6.0 Module version: current master branch

Description of the issue: The v1 api does not work any more, so I changed the downloader.js file to use v2 to get the team names and download the icons. An api key is needed as well as some other changes due to differences between v1 and v2. My solution does only work for me (api key & hardcoded for Germany - BL1) This is just a hint that you may want to update the downloader.js file to use v2 in the future.

Also I can't seem to get the focus_on function to work. I can use everything else and its working great. My config is:

config: {
    api_key: '<my key>',
    show:"GERMANY",
    focus_on: {"GERMANY": "VfB Stuttgart"},
    max_teams: 7,
    logos: true,
    colored:true,
    max_teams:3,
}

When the focus_on parameter is added no teams are visible. If I comment it out everything is working as intended. Could somebody help me out please?

MrDondoT commented 5 years ago

@Heiner92 no icons shown on API v1. err: {"message":"v1 has reached it's EOL. Please migrate to v2.","errorCode":410} call: http://api.football-data.org/v1/competitions/456/leagueTable

fewieden commented 4 years ago

@Heiner92 @MrDondoT the icon downloader was necessary as the v2 didn't provide logos anymore (might be different now), that's why the downloader was based on v1. The module is using the downloaded images in the folder, therefore the logos can be put there also manually.

If v2 supports now logos I would happily accept a pr that fixes the downloader.

Important for focus on is that you put exactly the team name as returned from the API, there were also changes in names from v1 to v2

fewieden commented 3 years ago

The newest version of this module is using remote icons again, as the API provides the logos again.