Fix braindead moments

This commit is contained in:
timoreo 2022-02-01 21:56:52 +01:00
parent aa2c27bf69
commit 71b1ac9f34
No known key found for this signature in database
GPG Key ID: 121A72C3512BA288
2 changed files with 6 additions and 4 deletions

View File

@ -83,7 +83,7 @@ void FlameMod::loadIndexedPackVersions(FlameMod::IndexedPack & pack, QJsonArray
} }
} }
} }
if(!valid || !hasFabric){ if(!valid && !hasFabric){
continue; continue;
} }

View File

@ -77,10 +77,12 @@ void Modrinth::loadIndexedPackVersions(Modrinth::IndexedPack & pack, QJsonArray
break; break;
} }
auto parent = files[i].toObject(); auto parent = files[i].toObject();
file.downloadUrl = Json::requireString(parent, "url"); if(parent.contains("url")) {
file.fileName = Json::requireString(parent, "filename"); file.downloadUrl = Json::requireString(parent, "url");
file.fileName = Json::requireString(parent, "filename");
unsortedVersions.append(file); unsortedVersions.append(file);
}
} }
auto orderSortPredicate = [](const IndexedVersion & a, const IndexedVersion & b) -> bool auto orderSortPredicate = [](const IndexedVersion & a, const IndexedVersion & b) -> bool
{ {