aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/ModIndex.cpp
diff options
context:
space:
mode:
authorAlexandru Ionut Tripon <alexandru.tripon97@gmail.com>2023-08-12 12:42:30 +0300
committerGitHub <noreply@github.com>2023-08-12 12:42:30 +0300
commitb3b2e9df35222209b4920202d86091eeeb87f03f (patch)
treece44c3877ee36c21279d142b2af1c393e7b87780 /launcher/modplatform/ModIndex.cpp
parentca061080c13042642fb3bd49a29a863756f45866 (diff)
parent3aba7f8fec45c7c87be486d8f6b5c96f69facf93 (diff)
downloadPrismLauncher-b3b2e9df35222209b4920202d86091eeeb87f03f.tar.gz
PrismLauncher-b3b2e9df35222209b4920202d86091eeeb87f03f.tar.bz2
PrismLauncher-b3b2e9df35222209b4920202d86091eeeb87f03f.zip
Merge branch 'develop' into feat/acknowledge_release_type
Signed-off-by: Alexandru Ionut Tripon <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/modplatform/ModIndex.cpp')
-rw-r--r--launcher/modplatform/ModIndex.cpp38
1 files changed, 22 insertions, 16 deletions
diff --git a/launcher/modplatform/ModIndex.cpp b/launcher/modplatform/ModIndex.cpp
index 3e1f473e..2e0d9e37 100644
--- a/launcher/modplatform/ModIndex.cpp
+++ b/launcher/modplatform/ModIndex.cpp
@@ -1,20 +1,20 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
-* PolyMC - Minecraft Launcher
-* Copyright (c) 2022 flowln <flowlnlnln@gmail.com>
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, version 3.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <https://www.gnu.org/licenses/>.
-*/
+ * Prism Launcher - Minecraft Launcher
+ * Copyright (c) 2022 flowln <flowlnlnln@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
#include "modplatform/ModIndex.h"
@@ -138,11 +138,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