Curseforge: Allow installation using Curse Project ID in place of slug.
This commit is contained in:
parent
376c485a5a
commit
440e8dd596
|
@ -29,8 +29,14 @@ class CurseForge(Web):
|
|||
except KeyError:
|
||||
pass
|
||||
|
||||
logger.debug("Getting CurseForge AddOn ID")
|
||||
slug = addon.url.split("/addons/")[-1]
|
||||
if slug.isnumeric():
|
||||
# We allow users to substitute AddOn slug with Curse "Project ID" for weirdly-named AddOns
|
||||
curse_id = int(slug)
|
||||
addon.provider_data["curse_id"] = curse_id
|
||||
return curse_id
|
||||
|
||||
logger.debug("Getting CurseForge AddOn ID")
|
||||
query = " ".join(( # slug "big-wigs" becomes query "big-wigs bigwigs big wigs"
|
||||
slug,
|
||||
slug.replace("-", ""),
|
||||
|
|
Loading…
Reference in a new issue