aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/ModIndex.cpp
diff options
context:
space:
mode:
authorTayou <31988415+TayouVR@users.noreply.github.com>2023-07-07 22:23:59 +0200
committerGitHub <noreply@github.com>2023-07-07 22:23:59 +0200
commit1131038fdb0093ef9c732b18d699b6176fc6d82c (patch)
treeeb930aa7d5a0f388095943ed45eb60c2d68f24d7 /launcher/modplatform/ModIndex.cpp
parentd1528c10440f424117e487f4a6e692c3e3a4277e (diff)
parentb8482a5d89b4044482e7b55aa1c2e2547b41f4fd (diff)
downloadPrismLauncher-1131038fdb0093ef9c732b18d699b6176fc6d82c.tar.gz
PrismLauncher-1131038fdb0093ef9c732b18d699b6176fc6d82c.tar.bz2
PrismLauncher-1131038fdb0093ef9c732b18d699b6176fc6d82c.zip
Merge pull request #1120 from Trial97/visit_mod_page
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