aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/ModIndex.cpp
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-07-08 00:14:05 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-07-08 00:14:05 +0300
commitbc2940e16a8a7839a120a45be9232b5adebbe751 (patch)
tree5952ce6503d0a084b7b44c16441caf56999ce303 /launcher/modplatform/ModIndex.cpp
parentcf2393a50966f8dc84720f7d44538b0cb7649d46 (diff)
parent1131038fdb0093ef9c732b18d699b6176fc6d82c (diff)
downloadPrismLauncher-bc2940e16a8a7839a120a45be9232b5adebbe751.tar.gz
PrismLauncher-bc2940e16a8a7839a120a45be9232b5adebbe751.tar.bz2
PrismLauncher-bc2940e16a8a7839a120a45be9232b5adebbe751.zip
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into settings
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
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