diff options
author | Ash <101582426+ashuntu@users.noreply.github.com> | 2023-07-28 21:22:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-28 21:22:35 +0000 |
commit | d133b40b254630f988c57c1111e4659023324edc (patch) | |
tree | 96217214a39945ef04e0d191d960481825ac65da /launcher/modplatform/ModIndex.cpp | |
parent | 51d7a6289e1cf2df463ae8d7c0b08b4a61faea3c (diff) | |
parent | bdec11c501a6438706f62465d89f2344f7856342 (diff) | |
download | PrismLauncher-d133b40b254630f988c57c1111e4659023324edc.tar.gz PrismLauncher-d133b40b254630f988c57c1111e4659023324edc.tar.bz2 PrismLauncher-d133b40b254630f988c57c1111e4659023324edc.zip |
Merge branch 'PrismLauncher:develop' into develop
Diffstat (limited to 'launcher/modplatform/ModIndex.cpp')
-rw-r--r-- | launcher/modplatform/ModIndex.cpp | 8 |
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 |