Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into metadata2

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2024-08-25 09:50:41 +03:00
18 changed files with 548 additions and 514 deletions

View File

@ -384,11 +384,11 @@ bool ModrinthCreationTask::parseManifest(const QString& index_path,
hash = Json::ensureString(hashes, "sha512");
hashAlgorithm = QCryptographicHash::Sha512;
if (hash.isEmpty()) {
hash = Json::ensureString(hashes, "sha1");
hashAlgorithm = QCryptographicHash::Sha1;
hash = Json::ensureString(hashes, "sha256");
hashAlgorithm = QCryptographicHash::Sha256;
if (hash.isEmpty()) {
hash = Json::ensureString(hashes, "sha256");
hashAlgorithm = QCryptographicHash::Sha256;
hash = Json::ensureString(hashes, "sha1");
hashAlgorithm = QCryptographicHash::Sha1;
if (hash.isEmpty()) {
throw JSONValidationError("No hash found for: " + file.path);
}