aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/ModIndex.cpp
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-07-08 01:27:30 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-07-08 01:27:30 -0700
commit7f138e353801d0dde7608f2900b78cbe48d9488d (patch)
tree42d146bd6a4f2a9cf026e106aa3aa1e5aaa95642 /launcher/modplatform/ModIndex.cpp
parentb8b8c8d4acab8c794555956fae699d5706e222f3 (diff)
parent3211b265d75dc7e28b1608935396bce2ac4648dd (diff)
downloadPrismLauncher-7f138e353801d0dde7608f2900b78cbe48d9488d.tar.gz
PrismLauncher-7f138e353801d0dde7608f2900b78cbe48d9488d.tar.bz2
PrismLauncher-7f138e353801d0dde7608f2900b78cbe48d9488d.zip
Merge branch 'develop' into ci/address-sanitiser_on_debug_builds
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