aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/modrinth
diff options
context:
space:
mode:
authorflow <thiagodonato300@gmail.com>2022-04-02 20:08:37 -0300
committerflow <thiagodonato300@gmail.com>2022-04-15 08:49:43 -0300
commit76dfb7825ade6554095ac3a09b3accdbd4db5138 (patch)
treefbe03978afee836e377f159e196183c28a88fb8e /launcher/modplatform/modrinth
parent5cb0e750936f09513b98a8b0fd57746ca18dc8bc (diff)
downloadPrismLauncher-76dfb7825ade6554095ac3a09b3accdbd4db5138.tar.gz
PrismLauncher-76dfb7825ade6554095ac3a09b3accdbd4db5138.tar.bz2
PrismLauncher-76dfb7825ade6554095ac3a09b3accdbd4db5138.zip
fix: 'All' filter working and get around CF API capabilities
Diffstat (limited to 'launcher/modplatform/modrinth')
-rw-r--r--launcher/modplatform/modrinth/ModrinthAPI.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/launcher/modplatform/modrinth/ModrinthAPI.h b/launcher/modplatform/modrinth/ModrinthAPI.h
index 87534ee9..6604d772 100644
--- a/launcher/modplatform/modrinth/ModrinthAPI.h
+++ b/launcher/modplatform/modrinth/ModrinthAPI.h
@@ -22,7 +22,7 @@ class ModrinthAPI : public NetworkModAPI {
"limit=25&"
"query=%2&"
"index=%3&"
- "facets=[[\"categories:%4\"],[%5],[\"project_type:mod\"]]")
+ "facets=[[\"categories:%4\"],%5[\"project_type:mod\"]]")
.arg(args.offset)
.arg(args.search)
.arg(args.sorting)
@@ -47,7 +47,7 @@ class ModrinthAPI : public NetworkModAPI {
s += QString("\"versions:%1\",").arg(ver.toString());
}
s.remove(s.length() - 1, 1); //remove last comma
- return s;
+ return s.isEmpty() ? QString() : QString("[%1],").arg(s);
}
static auto getModLoaderString(ModLoaderType type) -> const QString