Skip to content

Commit

Permalink
cf: support curseforge files that don't delcare any modloader (#400)
Browse files Browse the repository at this point in the history
  • Loading branch information
itzg authored Feb 13, 2024
1 parent 562c7e5 commit 7f823c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dev/curseforge.http
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ GET https://api.curseforge.com/v1/mods/search?gameId=432&slug=projekt-arcturus&c
x-api-key: {{cfApiKey}}

###
GET https://api.curseforge.com/v1/mods/644077/files/4772539
GET https://api.curseforge.com/v1/mods/search?gameId=432&slug=lazy-ae2&classId=6
x-api-key: {{cfApiKey}}

###
GET https://api.curseforge.com/v1/mods/322347/files/3254160
x-api-key: {{cfApiKey}}

###
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ private Mono<? extends CurseForgeFile> resolveModFileFromMod(String ref, String
&& (
// only mods require a specific mod loader, plugins are not that specific
!Objects.equals(category, CurseForgeApiClient.CATEGORY_MC_MODS)
// mod publisher didn't specifify a modloader...will just have to assume it's the type we need
|| fileIndex.getModLoader() == null
// but normally make sure it matches
|| fileIndex.getModLoader().equals(modLoaderType))
&& (fileMatcherStr == null || fileIndex.getFilename().contains(fileMatcherStr))
)
Expand Down

0 comments on commit 7f823c1

Please sign in to comment.