Fix modrinth usable URL in mod downloader

This commit is contained in:
dada513 2022-03-31 20:39:10 +02:00
parent e22d54abd3
commit 48a6380e31
No known key found for this signature in database
GPG Key ID: 403448C14FA4B33E

View File

@ -12,7 +12,7 @@ void Modrinth::loadIndexedPack(ModPlatform::IndexedPack& pack, QJsonObject& obj)
{ {
pack.addonId = Json::requireString(obj, "project_id"); pack.addonId = Json::requireString(obj, "project_id");
pack.name = Json::requireString(obj, "title"); pack.name = Json::requireString(obj, "title");
pack.websiteUrl = Json::ensureString(obj, "page_url", ""); pack.websiteUrl = "https://modrinth.com/mod/" + Json::ensureString(obj, "slug", "");
pack.description = Json::ensureString(obj, "description", ""); pack.description = Json::ensureString(obj, "description", "");
pack.logoUrl = Json::requireString(obj, "icon_url"); pack.logoUrl = Json::requireString(obj, "icon_url");