Commit Graph

27 Commits

Author SHA1 Message Date
fcdc7a1a35 fix: fix Modrinth query when Quilt is in use 2022-04-19 10:22:50 +02:00
cab9afa45f 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.
2022-04-16 23:40:10 +02:00
76dfb7825a fix: 'All' filter working and get around CF API capabilities 2022-04-15 08:49:43 -03:00
5cb0e75093 fix(ui): Refresh mod list when changing filtering options 2022-04-15 08:49:41 -03:00
c730fd6e5f feat: Use version filter when searching mods 2022-04-15 08:45:30 -03:00
9fb5674233 refactor: cleanup ModLoaderType 2022-04-14 21:55:03 +02:00
35cfb41a9c fix: check for Quilt as Fabric-compatible loader 2022-04-07 18:46:09 +02:00
bd8b61651a Check for empty slug before setting pack url 2022-04-03 23:12:46 +01:00
48a6380e31 Fix modrinth usable URL in mod downloader 2022-03-31 20:39:10 +02:00
d00c320c00 optimize: Improve mod versions request to Modrinth
This uses more arguments in the GET request for mod versions on the
Modrinth API, filtering what versions can be returned, decreasing load
on Modrinth servers and improving a little the time it takes for the versions to be
available to the user.

This also removes the now unneeded check on correct modloaders in
ModrinthPackIndex, since it is now filtered by the Modrinth server.

Lastly, this adds a couple of helper functions in ModModel.
2022-03-24 19:31:11 -03:00
e13ca94061 chore: resolve conflicts and merge upstream 2022-03-24 18:24:51 -03:00
f3a244e90a fix: fix skipping one on file counting in mod version parse 2022-03-22 19:45:31 -03:00
fa5fa53592 fix: Use primary file for mod download on Modrinth 2022-03-18 10:52:47 -03:00
8409aa2571 tidy: Fix clang-tidy issues on files changed in this PR
The checks used are roughly the same as the ones proposed in the
clang-tidy PR (except perhaps that I used modernize-* instead of listing
them individually,though I don't think this caused any readability
detriments).

In ModrinthModel.cpp and FlameModModel.cpp I ignored the
modernize-avoid-c-arrays one, mostly because making the sorts array an
std::array would most likely increase the code complexity because of the
virtual function. Aside from that, the static_cast warning from
Application.h was not dealt with, since it's not in this PR's scope.
2022-03-14 17:43:36 -03:00
16bfafa29e refactor: de-duplicate common code in network mod APIs 2022-03-07 17:45:28 -03:00
f714adf6d2 refactor: move NetJob away from ModModel to ModAPI
This is done so that 1. ModAPI behaves more like an actual API instead
of just a helper, and 2. Allows for more easily creating other mod
providers that may or may not use network tasks (foreshadowing lol)
2022-03-07 16:22:57 -03:00
39bd04f06f refactor: use Enum instead of raw int for ModLoaderType 2022-03-06 16:45:39 -03:00
2d68308d49 refactor: move url creation for mods to modplatform/
Moves all things related to creating the URLs of the mod platforms
that go to network tasks to a single place, so that:

1. Maintaining and fixing eventual issues is more straightforward.
2. Makes it possible to factor out more common code between the
   different modplatform pages
2022-03-02 23:13:04 -03:00
881b2f2b38 refactor: Use a single indexed pack for mods
Since there's little difference between them, let's remove duplication
and merge them.
2022-03-02 18:49:19 -03:00
71b1ac9f34 Fix braindead moments 2022-02-01 21:56:52 +01:00
aa2c27bf69 Update to Modrinth API V2 2022-01-31 17:18:11 +01:00
1d0e6bf453 Changed modrinth author data to not be a list 2022-01-24 07:23:01 +01:00
621e0ba4a8 Added smart file selection
This might fail in a few special cases
2022-01-15 10:25:24 +01:00
4b37c46889 Filtering per mod loader & mc version 2022-01-15 08:51:47 +01:00
1a8c972aef Fixed icons
Also having a mod loader is now enforced
2022-01-14 20:22:15 +01:00
9e6fa8f29a Added the downloading of the mods 2022-01-14 12:47:18 +01:00
4e9039be2d Start of mod downloading 2022-01-14 09:56:27 +01:00