Skip to content

Commit

Permalink
Update Updater.py
Browse files Browse the repository at this point in the history
Added line to filter for exact version matches for CurseForge links.
Had to do this to fix searching for "1.19" files but receiving "1.19-Snapshot" files as well, causing incorrect files to download.
  • Loading branch information
RandomGgames committed Jul 9, 2022
1 parent 6be4c51 commit dae4a58
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ def logExit(text, end = "\n"):

curseforge_files = requests.get(f"https://api.curseforge.com/v1/mods/{curseforge_id}/files", params = {"gameVersion": version, "modLoaderType": curseforge_modLoaderType}, headers = headers).json()["data"]
if len(curseforge_files) > 0:
curseforge_files = list(file for file in curseforge_files if version in file["gameVersions"])


latest_curseforge_file = curseforge_files[0]
file_name = latest_curseforge_file["fileName"]
Expand Down

0 comments on commit dae4a58

Please sign in to comment.