fix: Always tell Flame API which modloader we are using

Fixes #206 partially. Although we don't list mods that have no
compatibility with the mod loader we are using, mods that have support
for both loaders still show up, and the versions for both the loaders
are still shown.

Also simplifies a little the logic in
FlameModIndex::loadIndexedPackVersions
This commit is contained in:
flow
2022-02-27 15:05:38 -03:00
parent 84e9ce71b0
commit 075d900d45
2 changed files with 19 additions and 17 deletions

View File

@ -175,13 +175,13 @@ void ListModel::performPaginatedSearch()
"pageSize=25&"
"searchFilter=%2&"
"sort=%3&"
"%4"
"modLoaderType=%4&"
"gameVersion=%5"
)
.arg(nextSearchOffset)
.arg(currentSearchTerm)
.arg(sorts[currentSort])
.arg(hasFabric ? "modLoaderType=4&" : "")
.arg(hasFabric ? 4 : 1) // Enum: https://docs.curseforge.com/?http#tocS_ModLoaderType
.arg(mcVersion);
netJob->addNetAction(Net::Download::makeByteArray(QUrl(searchUrl), &response));