Fix modrinth search filters

This commit is contained in:
timoreo 2022-05-29 18:23:34 +02:00
parent 73e46e569f
commit 2746251dcd
No known key found for this signature in database
GPG Key ID: 121A72C3512BA288
2 changed files with 5 additions and 5 deletions

View File

@ -68,7 +68,7 @@ class ModAPI {
{
QString s;
for(auto& ver : mcVersions){
s += QString("%1,").arg(ver.toString());
s += QString("\"%1\",").arg(ver.toString());
}
s.remove(s.length() - 1, 1); //remove last comma
return s;

View File

@ -79,11 +79,11 @@ class ModrinthAPI : public NetworkModAPI {
{
return QString(BuildConfig.MODRINTH_PROD_URL +
"/project/%1/version?"
"game_versions=[%2]"
"game_versions=[%2]&"
"loaders=[\"%3\"]")
.arg(args.addonId)
.arg(getGameVersionsString(args.mcVersions))
.arg(getModLoaderStrings(args.loaders).join("\",\""));
.arg(args.addonId,
getGameVersionsString(args.mcVersions),
getModLoaderStrings(args.loaders).join("\",\""));
};
auto getGameVersionsArray(std::list<Version> mcVersions) const -> QString