propagate side as enum instead of Qstring

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2025-03-25 00:09:15 +02:00
parent 178965676e
commit be963764ea
No known key found for this signature in database
GPG key ID: 55EF5DA53DB36318
18 changed files with 89 additions and 131 deletions

View file

@ -63,11 +63,11 @@ void Modrinth::loadIndexedPack(ModPlatform::IndexedPack& pack, QJsonObject& obj)
auto server = shouldDownloadOnSide(Json::ensureString(obj, "server_side"));
if (server && client) {
pack.side = "both";
pack.side = ModPlatform::Side::UniversalSide;
} else if (server) {
pack.side = "server";
pack.side = ModPlatform::Side::ServerSide;
} else if (client) {
pack.side = "client";
pack.side = ModPlatform::Side::ClientSide;
}
// Modrinth can have more data than what's provided by the basic search :)