Use slug for url

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2023-06-22 18:11:03 +03:00
parent 9ad356d66f
commit 4e07f9574a
No known key found for this signature in database
GPG Key ID: 55EF5DA53DB36318

View File

@ -32,7 +32,7 @@ QString ExportModsToStringTask(QList<Mod*> mods, Formats format, OptionalData ex
if (meta != nullptr) {
url = (meta->provider == ModPlatform::ResourceProvider::FLAME ? "https://www.curseforge.com/minecraft/mc-mods/"
: "https://modrinth.com/mod/") +
meta->project_id.toString();
meta->slug.remove(".pw.toml");
}
if (!url.isEmpty())
modName = QString("<a href=\"%1\">%2</a>").arg(url, modName);
@ -61,7 +61,7 @@ QString ExportModsToStringTask(QList<Mod*> mods, Formats format, OptionalData ex
if (meta != nullptr) {
url = (meta->provider == ModPlatform::ResourceProvider::FLAME ? "https://www.curseforge.com/minecraft/mc-mods/"
: "https://modrinth.com/mod/") +
meta->project_id.toString();
meta->slug.remove(".pw.toml");
}
if (!url.isEmpty())
modName = QString("[%1](%2)").arg(modName, url);