mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 13:17:41 +02:00
fix: query for Fabric mods if Quilt is in use
Right now we want to include Fabric mods in our searches where possible. Modrinth allows definining multiple loaders, while Flame only allows a single value. As a compromise we ask for Fabric mods only on Flame and for both Fabric and Quilt mods on Modrinth.
This commit is contained in:
@ -23,7 +23,7 @@ class FlameAPI : public NetworkModAPI {
|
||||
.arg(args.offset)
|
||||
.arg(args.search)
|
||||
.arg(args.sorting)
|
||||
.arg(args.mod_loader)
|
||||
.arg(getMappedModLoader(args.mod_loader))
|
||||
.arg(gameVersionStr);
|
||||
};
|
||||
|
||||
@ -31,4 +31,13 @@ class FlameAPI : public NetworkModAPI {
|
||||
{
|
||||
return QString("https://addons-ecs.forgesvc.net/api/v2/addon/%1/files").arg(args.addonId);
|
||||
};
|
||||
|
||||
public:
|
||||
static auto getMappedModLoader(const ModLoaderType type) -> const ModLoaderType
|
||||
{
|
||||
// TODO: remove this once Quilt drops official Fabric support
|
||||
if (type == Quilt) // NOTE: Most if not all Fabric mods should work *currently*
|
||||
return Fabric;
|
||||
return type;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user