gug
This commit is contained in:
parent
f7abfa31c9
commit
d325812104
3 changed files with 18 additions and 17 deletions
|
@ -24,24 +24,25 @@ for mod in glob.glob("pack/mods/*.toml"):
|
|||
moddata = dict()
|
||||
moddata["name"] = data["name"]
|
||||
moddata["url"] = ""
|
||||
moddata["side"] = data["side"] or "both"
|
||||
moddata["side"] = data["side"]
|
||||
license = dict()
|
||||
|
||||
if "modrinth" in data["update"]:
|
||||
id = data["update"]["modrinth"]["mod-id"]
|
||||
moddata["id"] = id
|
||||
moddata["url"] = "https://modrinth.com/mod/" + id
|
||||
moddata["site"] = "Modrinth"
|
||||
if "update" in data:
|
||||
if "modrinth" in data["update"]:
|
||||
id = data["update"]["modrinth"]["mod-id"]
|
||||
moddata["id"] = id
|
||||
moddata["url"] = "https://modrinth.com/mod/" + id
|
||||
moddata["site"] = "Modrinth"
|
||||
|
||||
if id in cache:
|
||||
data = cache[id]
|
||||
else:
|
||||
data = requests.get("https://api.modrinth.com/v2/project/" + id).json()["license"]
|
||||
cache[id] = data
|
||||
moddata["license"] = data
|
||||
elif "curseforge" in data["update"]:
|
||||
moddata["url"] = "https://legacy.curseforge.com/projects/" + str(data["update"]["curseforge"]["project-id"])
|
||||
moddata["site"] = "CurseForge"
|
||||
if id in cache:
|
||||
data = cache[id]
|
||||
else:
|
||||
data = requests.get("https://api.modrinth.com/v2/project/" + id).json()["license"]
|
||||
cache[id] = data
|
||||
moddata["license"] = data
|
||||
elif "curseforge" in data["update"]:
|
||||
moddata["url"] = "https://legacy.curseforge.com/projects/" + str(data["update"]["curseforge"]["project-id"])
|
||||
moddata["site"] = "CurseForge"
|
||||
|
||||
count[moddata["side"]] += 1
|
||||
mods[moddata["name"]] = moddata
|
||||
|
|
|
@ -2,7 +2,7 @@ hash-format = "sha256"
|
|||
|
||||
[[files]]
|
||||
file = ".forgejo/scripts/update-wiki.py"
|
||||
hash = "d6eb4fde3e39f638f1b114a54d1ff67fc69aee974ad1d6d8cf4a809b3e250783"
|
||||
hash = "d209298c411bce72d7795d8fcf89a4c92d5cbe485b6e347e75ef29b4b1e36310"
|
||||
|
||||
[[files]]
|
||||
file = ".forgejo/workflows/update-wiki.yaml"
|
||||
|
|
|
@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0"
|
|||
[index]
|
||||
file = "index.toml"
|
||||
hash-format = "sha256"
|
||||
hash = "f36588fd13fbbe794b6effa9da6c98e1195a89b8ccc1bf03bd5c000b3ff178d9"
|
||||
hash = "f08bad13520e5e71cf1e1e454dbf43738042ab8212857b0a019c6eaf655268a8"
|
||||
|
||||
[versions]
|
||||
fabric = "0.16.5"
|
||||
|
|
Loading…
Add table
Reference in a new issue