Add support for WotLK

This commit is contained in:
Casper V. Kristensen 2022-08-27 21:38:15 +02:00
parent ca190bfc94
commit 573530e446
2 changed files with 5 additions and 1 deletions

View file

@ -77,7 +77,8 @@ class CurseForge(Web):
files = http.open(f"{cls.api_url}/v1/mods/{curse_id}/files", headers=cls.headers()).json()["data"] files = http.open(f"{cls.api_url}/v1/mods/{curse_id}/files", headers=cls.headers()).json()["data"]
def key(index: int, file: dict) -> tuple: def key(index: int, file: dict) -> tuple:
version_priorities = [73246, 67408, 517] # https://api.curseforge.com/v1/games/1/version-types # https://api.curseforge.com/v1/games/1/version-types: [WotLK, TBC, Classic, Retail]
version_priorities = [73713, 73246, 67408, 517]
return ( return (
min(version_priorities.index(v["gameVersionTypeId"]) for v in file["sortableGameVersions"]), min(version_priorities.index(v["gameVersionTypeId"]) for v in file["sortableGameVersions"]),
file["releaseType"], # releaseType: 1: release, 2: beta, 3: alpha file["releaseType"], # releaseType: 1: release, 2: beta, 3: alpha

View file

@ -30,11 +30,14 @@ class GitHub(Web):
).json() ).json()
asset_priorities = [ asset_priorities = [
r"[._-]wotlk[._-]",
r"[._-]wrath[._-]",
r"[._-]tbc[._-]", r"[._-]tbc[._-]",
r"[._-]tbcc[._-]", r"[._-]tbcc[._-]",
r"[._-]bcc[._-]", r"[._-]bcc[._-]",
r"[._-]bc[._-]", r"[._-]bc[._-]",
r"[._-]classic[._-]", r"[._-]classic[._-]",
r"[._-]vanilla[._-]",
r".*", r".*",
] ]
for asset in sorted( for asset in sorted(