Commit Graph

71 Commits

Author SHA1 Message Date
flow
631a93bcd8
refactor: add a HashUtils place for hashing stuff
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-24 17:46:54 -03:00
flow
15ec1abb6a
feat: use QIODevice for calcuating the JAR hash on Modrinth
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-24 17:46:53 -03:00
flow
de9e304236
fix: std::list -> QList
Qt6 removed Qlist::toStdList() 😭

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:45 -03:00
flow
001bbef9ee
fix: don't use shared_ptr for a background task T_T
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:44 -03:00
flow
c4316e81e6
change: make Mod a QObject used as a pointer
Prevents problems when copying it around!

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:44 -03:00
flow
5f75e531e6
fix: handling around disabled mods
Don't update disabled mods to prevent mod duplication. Also, chop
filename in the metadata with a '.disabled'.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:43 -03:00
flow
a7648d60ce
fix: don't require non-essential items in mod index
Also adds slug field.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:43 -03:00
flow
52c45c2d32
feat: add some mod api calls
- Get Project: Already existed but required a specific caller type. This
  is more general.
- Get Projects: A single call to multiple of the above

Both providers support these calls.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:43 -03:00
flow
4e6978ff6f
feat: improve metadata gen. networking and performance
This makes the metadata generation code a lot messier and harder to use,
but there's not really much else that can be done about it while
preserving all it's capabilities :(

At least we now have speed

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:43 -03:00
flow
6e2869834f
feat: add mod update dialog
This subclasses the Review mods dialog to make a "Update review" one.
Also, all the necessary components built until now are put together in a
coherent unity that checks and generates metadata on-the-fly and checks for
mod updates, while giving and receiving feedback to the user.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:42 -03:00
flow
b8b71c7dd2
feat: add mod update check tasks
Those tasks take a list of mods and check on the mod providers for
updates. They assume that the mods have metadata already.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:42 -03:00
flow
c3f6c3dd82
feat: add changelog to mod providers
The Modrinth changelog is fairly straight-forward, as it's given to us
directly with the API call we already did. Flame, on the other hand,
requires us to do another call to get the changelog, so it can introduce
quite a heavy performance impact. This way, we make it optional to get
such changelog.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:42 -03:00
flow
0e52112016
feat: add some api calls to modrinth
Calls added:
- Get version from hash
- Get versions from hashes
- Latest version of a project from a hash, loader(s), and game version(s)
- Latest versions of multiple project from hashes, loader(s), and game version(s)

Some of those are not used yet, but may be of use later on, so we have
it if we need it :)

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:41 -03:00
Ezekiel Smith
27239b2dde
Merge pull request #634 from flowln/donate_links
More links for CF / Modrinth mods / modpacks
2022-06-14 23:52:00 +10:00
flow
b3c8f9d508
revert: don't check modrinth whitelisted hosts
people didn't seem to like it, and its not required
2022-06-09 19:57:51 -03:00
flow
1b878030aa
fix: enable using more than one download url in mrpacks
Kinda, it's ugly and hackish, since we don't have the facilities to
do this properly (yet!)
2022-06-09 19:54:50 -03:00
Sefa Eyeoglu
1ab00ca8b2
Merge pull request #426 from flowln/mod_perma
Add on-disk mod metadata information
2022-06-04 13:23:38 +02:00
timoreo
2746251dcd
Fix modrinth search filters 2022-05-29 18:23:34 +02:00
Lenny McLennington
abd240468e clean up validateDownloadUrl 2022-05-28 17:11:55 -03:00
flow
b5e00027d1
change: add 'gitlab.com' to whitelisted Modrinth modpack urls 2022-05-28 17:01:58 -03:00
flow
f4604bbf79
change: update whitelisted hosts in Modrinth modpacks 2022-05-28 17:01:52 -03:00
flow
ae2ef324f2
feat: add remaining links to modrinth mods 2022-05-24 11:58:11 -03:00
flow
d0337da8ea
feat: add remaining links to modrinth modpacks 2022-05-24 11:52:27 -03:00
flow
22e0527502
feat: add donate info to modrinth modpacks 2022-05-24 09:46:58 -03:00
flow
ca3c6c5e8a
feat: add donate links for modrinth mods 2022-05-24 09:38:48 -03:00
flow
2fc1b99911
chore: add license headers
Prevents a massive inload of Scrumplex ditto's :)

I didn't add it to every file modified in this PR because the other
changes are pretty minor, and would explode the diff of the PR. I hope
that's not a problem O_O
2022-05-23 14:58:14 -03:00
flow
59d628208b
feat: allow trying to use multiple hash types 2022-05-23 14:43:31 -03:00
flow
5c5699bba5
refactor: move individual pack version parsing to its own function 2022-05-23 14:43:31 -03:00
flow
e17b6804a7
fix: implement PR suggestions
Some stylistic changes, and get hashes from the mod providers when
building the metadata.
2022-05-23 14:43:09 -03:00
flow
a99858c64d
refactor: move code out of ModIndex.h
Now it's in ModIndex.cpp
2022-05-23 14:43:07 -03:00
flow
b30b88716e
feat: add very early mod.toml packwiz support
Also use it as a on-disk format for storing mod metadata. This will be
used later on to make better mod managment.
2022-05-23 14:42:22 -03:00
Sefa Eyeoglu
36045a8b0a
chore: improve readability
Co-authored-by: flow <thiagodonato300@gmail.com>
2022-05-19 12:37:20 +02:00
Sefa Eyeoglu
943090db98
refactor: allow tracking multiple mod loaders 2022-05-19 08:49:27 +02:00
flow
887246a66b
fix: typo and useless code 2022-05-16 17:09:14 -03:00
flow
7194bb1b81
fix: validate whitelisted download urls 2022-05-15 16:06:49 -03:00
flow
5f2398fe59
chore: license headers 2 2022-05-15 08:26:34 -03:00
Sefa Eyeoglu
3abf466632
chore: add/update license headers 2022-05-15 13:20:05 +02:00
flow
4bb429a0fb
change: use build variables for the modrinth API URLs
Make it more consistent with the others
2022-05-15 07:43:02 -03:00
flow
4a0e4fdb85 fix: add author page url 2022-05-15 07:15:56 -03:00
Sefa Eyeoglu
9731e06728
fix: fix build on Qt 5.12 2022-05-15 11:49:27 +02:00
flow
4745ed2818
fix: choose valid download url even if it's not the primary one
It seems to be possible to have modpack versions that have to primary
file. In those cases, we pick a valid one "at random".
2022-05-14 22:50:04 -03:00
flow
9899a0e098
fix: Have the URL be the project URL itself
(I think, doesn't seem to work for the waffle though, probably because
of the staging API :/)
2022-05-14 21:47:35 -03:00
flow
4fda35b466
feat: add modrinth pack downloading
Things that don't work / work poorly (there's more for sure but those
are the evident ones):
    - Icons are broken in the import dialog
    - No way to search for private packs
    - Icons are not downloaded when downloading a mod
    - No support for multiple download URLs
    - Probably a lot more...
2022-05-14 20:19:26 -03:00
kb1000
db03846358
Add support for importing Modrinth packs from files 2022-05-14 20:01:09 +02:00
Sefa Eyeoglu
fcdc7a1a35
fix: fix Modrinth query when Quilt is in use 2022-04-19 10:22:50 +02:00
Sefa Eyeoglu
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
flow
76dfb7825a fix: 'All' filter working and get around CF API capabilities 2022-04-15 08:49:43 -03:00
flow
5cb0e75093 fix(ui): Refresh mod list when changing filtering options 2022-04-15 08:49:41 -03:00
flow
c730fd6e5f feat: Use version filter when searching mods 2022-04-15 08:45:30 -03:00
Sefa Eyeoglu
9fb5674233
refactor: cleanup ModLoaderType 2022-04-14 21:55:03 +02:00