From 2a403b3bfe9f4c79c38c33e80515a232576f6018 Mon Sep 17 00:00:00 2001 From: eff3ry Date: Wed, 22 Jan 2025 01:39:28 +1300 Subject: [PATCH] Edit Modrinth search faucets Edit Modrinth search faucets to alter the client and server filters to be more in-line with the Modrinth website and Launcher, making it easier to find client-side only mods etc. Signed-off-by: Jeffery Tolmie Jeffery.tolmie@gmail.com --- launcher/modplatform/modrinth/ModrinthAPI.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/launcher/modplatform/modrinth/ModrinthAPI.h b/launcher/modplatform/modrinth/ModrinthAPI.h index 3a5c21ed1..ae74545e2 100644 --- a/launcher/modplatform/modrinth/ModrinthAPI.h +++ b/launcher/modplatform/modrinth/ModrinthAPI.h @@ -71,13 +71,15 @@ class ModrinthAPI : public NetworkResourceAPI { static auto getSideFilters(QString side) -> const QString { - if (side.isEmpty() || side == "both") { + if (side.isEmpty()) { return {}; } + if (side == "both") + return QString("\"client_side:required\"],[\"server_side:required\""); if (side == "client") - return QString("\"client_side:required\",\"client_side:optional\""); + return QString("\"client_side:required\",\"client_side:optional\"],[\"server_side:optional\",\"server_side:unsupported\""); if (side == "server") - return QString("\"server_side:required\",\"server_side:optional\""); + return QString("\"server_side:required\",\"server_side:optional\"],[\"client_side:optional\",\"client_side:unsupported\""); return {}; }