dustinblackman / Championify

Import recent item sets from popular aggregators like Champion.gg in to League of Legends to use within game! No hassle.
MIT License
890 stars 157 forks source link

Champion.gg and incorrect LoL version build download issues #411

Open Anarchly opened 6 years ago

Anarchly commented 6 years ago

What operating system: Windows 10 What version of Championify: v2.1.5 What distribution of the league client are you using (NA, EUW, KR, Garena, ect)?: NA Please explain the issue you're encountering: When I go to update builds, the download process goes through completely fine, but at the end tells me there are no builds available for champion.gg but works fine for op.gg and I believe it is due to it recognizing that my LoL version is still on 8.11, but that is not the case. Logs: championify.log.txt

Erlifant commented 6 years ago

Same issue for me. Championify will always detect LoL version 8.11, despite it being 8.12.

//e: I think the issue is that championify will check the realm-version instead of the version

oddeirik commented 6 years ago

I think you're right, jErprog. Here's the function getRiotVer(): https://github.com/dustinblackman/Championify/blob/master/src/championify.js#L34

It hits na/realms.json then uses the "v" key to define the LoL version. I'm not at all familiar with the LoL API, but here's what https://ddragon.leagueoflegends.com/realms/na.json currently returns: { "n": { "item": "8.11.1", "rune": "7.23.1", "mastery": "7.23.1", "summoner": "8.11.1", "champion": "8.11.1", "profileicon": "8.11.1", "map": "8.11.1", "language": "8.11.1", "sticker": "8.11.1" }, "v": "8.11.1", "l": "en_US", "cdn": "http://ddragon.leagueoflegends.com/cdn", "dd": "8.11.1", "lg": "8.11.1", "css": "8.11.1", "profileiconmax": 28, "store": null }

According to https://developer.riotgames.com/api-methods/#lol-static-data-v3/GET_getRealm, the "v" key is the "Current version of this file for this realm.". No idea what if this version should correspond to the actual game client version, but it doesn't for the time being at least.

Perhaps https://developer.riotgames.com/api-methods/#lol-static-data-v3/GET_getVersions is the correct API to use for retrieving the latest client version?

If I can find some time this week, I can set up a PR for it. Should just be a quick change of that one method and getting the first element of the returned array instead of looking for the "v" key.

ElWinnero commented 6 years ago

unbenannt

WereGoingOcean commented 6 years ago

From what I got from the guys on the Riot API discord, the static data is manually updated after the patch. It seems like Riot might have just forgotten to make part of the update