Age | Commit message (Collapse) | Author |
|
Firstly, this abstract away behavior in the mod download models that can
also be applied to other types of resources into a superclass, allowing
other resource types to be implemented without so much code duplication.
For that, this also generalizes the APIs used (currently, ModrinthAPI
and FlameAPI) to be able to make requests to other types of resources.
It also does a general cleanup of both of those. In particular, this
makes use of std::optional instead of invalid values for errors and,
well, optional values :p
This is a squash of some commits that were becoming too interlaced
together to be cleanly separated.
Signed-off-by: flow <flowlnlnln@gmail.com>
|
|
We can use the queues directly instead.
Signed-off-by: flow <flowlnlnln@gmail.com>
|
|
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
|
|
MSVC warns about shadowing variables
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
|
|
Clang-cl fails to select the correct function and instead errors
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
|
|
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
|
|
Signed-off-by: flow <flowlnlnln@gmail.com>
|
|
Reduce code duplication in tasks, fix some bugs and add some tests
|
|
|
|
Avoids lots of code duplication
Signed-off-by: flow <flowlnlnln@gmail.com>
|
|
Those are entries that don't get stale over time, so we don't invalidate
them if they 'expire'.
Signed-off-by: flow <flowlnlnln@gmail.com>
|
|
|
|
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
|
|
|
|
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
|
|
This uses the 'Age', 'Cache-Control' and 'Expires' HTTP headers to more
accurately set up the cache lifetime, falling back to a static 1-week
time if they're not present in the response.
Signed-off-by: flow <flowlnlnln@gmail.com>
|
|
This maintains the same behaviour as the Download task.
Signed-off-by: flow <flowlnlnln@gmail.com>
|
|
This is to prevent problems where the cache entry would still be used
way after the remote resource got updated. The limit is hardcoded for 1
week, which I think is a reasonable time, but this could be further
tweaked.
Signed-off-by: flow <flowlnlnln@gmail.com>
|
|
|
|
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
|
|
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
|
|
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
|
|
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
|
|
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
|
|
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
|
|
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
|
|
This reverts commit 2ff0aa09e35eb6910ef0a030ea41f84a1ed95782.
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
|
|
|
|
|
|
|
|
* Use the bulk endpoint on mod resolution for faster download
* Search on modrinth for api blocked mods
* Display a dialog for manually downloading blocked mods
|
|
- There's now a notice reminding people to change the base URL if they
had a custom base URL and change the paste type (that was something I
personally had problems with when I was testing, so a reminder was
helpful for me).
- Broke down some of the long lines on APIPage.cpp to be more readable.
- Added copyright headers where they were missing.
- Changed the paste service display names to the names they are more
commonly known by.
- Changed the default hastebin base URL to https://hst.sh due to the
acquisition of https://hastebin.com by Toptal.
|
|
|
|
Refactor a little the code in `launcher/net/` files
|
|
|
|
This is what happens when you auto-pilot stuff xdd
|
|
|
|
Also sets up correctly the status connections
|
|
This runs clang-tidy on some other files in launcher/net/.
This also makes use of some JSON wrappers in HttpMetaCache, instead of
using the Qt stuff directly.
Lastly, this removes useless null checks (crashes don't occur because of
this, but because of concurrent usage / free of the QByteArray pointer),
and fix a fixme in Download.h
|
|
Since now we're inheriting from Task, some signals can be reused.
|
|
This also reduces some code duplication by using some Task logic in
NetAction.
|
|
|
|
|
|
|
|
- Modified PasteUpload task to upload the log file to 0x0.st and other
services with the same protocol.
- Modified Paste settings UI to allow the user to select a custom paste
URL, simplified the settings page code.
|
|
Feed it network upfront...
|
|
|
|
|
|
|
|
|