aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/ModIndex.cpp
diff options
context:
space:
mode:
authorTheKodeToad <TheKodeToad@proton.me>2023-07-11 11:14:06 +0100
committerGitHub <noreply@github.com>2023-07-11 11:14:06 +0100
commit4c6929038159a29c437b30616daa0b2672531e4d (patch)
treeba99c0783670059b7818aa14d3720f7798081ed7 /launcher/modplatform/ModIndex.cpp
parent64c591b234cec2519d8a04b32d4b6e85dcf204da (diff)
parent640aaa8c23d714ce17bc8e78754af6219abc6466 (diff)
downloadPrismLauncher-4c6929038159a29c437b30616daa0b2672531e4d.tar.gz
PrismLauncher-4c6929038159a29c437b30616daa0b2672531e4d.tar.bz2
PrismLauncher-4c6929038159a29c437b30616daa0b2672531e4d.zip
Merge branch 'develop' into better-component-installation
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Diffstat (limited to 'launcher/modplatform/ModIndex.cpp')
-rw-r--r--launcher/modplatform/ModIndex.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/launcher/modplatform/ModIndex.cpp b/launcher/modplatform/ModIndex.cpp
index 6a507caf..a1c4d891 100644
--- a/launcher/modplatform/ModIndex.cpp
+++ b/launcher/modplatform/ModIndex.cpp
@@ -70,11 +70,17 @@ auto ProviderCapabilities::hash(ResourceProvider p, QIODevice* device, QString t
}
QCryptographicHash hash(algo);
- if(!hash.addData(device))
+ if (!hash.addData(device))
qCritical() << "Failed to read JAR to create hash!";
Q_ASSERT(hash.result().length() == hash.hashLength(algo));
return { hash.result().toHex() };
}
+QString getMetaURL(ResourceProvider provider, QVariant projectID)
+{
+ return ((provider == ModPlatform::ResourceProvider::FLAME) ? "https://www.curseforge.com/projects/" : "https://modrinth.com/mod/") +
+ projectID.toString();
+}
+
} // namespace ModPlatform