RCVolus / lol-pick-ban-ui

Web-Based UI to display the league of legends champ select in esports tournaments.
MIT License
245 stars 68 forks source link

Centered Splash Arts corrupted under 13.4.1 #167

Open Cinzya opened 1 year ago

Cinzya commented 1 year ago

Data Dragon just released a new version, 13.4.1, which leads the backend to download the assets for this new patch. However, CommunityDragon hasn't come out with a package for 13.4 as of the time of writing, which leads to a dead end, when trying to access material under this version.

image

This affects the centered splash arts, as they are being accessed under the latest major version, which are corrupted when they are downloaded. When inspecting the properties you can see that the centered splash arts are only a few bytes large and reveal following when opened in an text editor:

<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.18.0 (Ubuntu)</center>
<script defer src="https://static.cloudflareinsights.com/beacon.min.js/vaafb692b2aea4879b33c060e79fe94621666317369993" integrity="sha512-0ahDYl866UMhKuYcW078ScMalXqtFJggm7TmlUtp0UlD4eQk0Ixfnm5ykXKvGJNFjLMoortdseTfsRT8oCfgGA==" data-cf-beacon='{"rayId":"79dcdb576e33b742","token":"1d93d63ea58c4eb382141ef0047426c3","version":"2023.2.0","si":100}' crossorigin="anonymous"></script>
</body>
</html>

image

Changing the source code, to retrieve data from string latest instead of the latest Major/Minor Version would fix this issue and avoid conflicts like this in the future.

https://github.com/RCVolus/lol-pick-ban-ui/blob/021b0f3a144839d4daea6293148a839a91d2a3ba/backend/data/league/DataDragon.ts#L76

I'd love to do a pull request, but I think that might be a bit overkill for a one-liner fix :)