add open source filter

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2024-10-27 11:56:48 +02:00
parent 5b8ea89092
commit 935b2e8fb2
8 changed files with 31 additions and 5 deletions

View File

@@ -116,6 +116,8 @@ class ModrinthAPI : public NetworkResourceAPI {
}
if (args.categoryIds.has_value() && !args.categoryIds->empty())
facets_list.append(QString("[%1]").arg(getCategoriesFilters(args.categoryIds.value())));
if (args.openSource)
facets_list.append("[\"open_source:true\"]");
facets_list.append(QString("[\"project_type:%1\"]").arg(resourceTypeParameter(args.type)));