aboutsummaryrefslogtreecommitdiff
path: root/launcher/net
AgeCommit message (Collapse)Author
2023-01-13refactor: generalize mod models and APIs to resourcesflow
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>
2022-12-17refactor(Tasks): remove 'm_total_size' from ConcurrentTaskflow
We can use the queues directly instead. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-11-21refactor: remove old updaterSefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-11-14Prefix member variables in HttpMetaCacheTheLastRar
MSVC warns about shadowing variables Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
2022-11-04Fix: Resolve ambiguous overload errorsTheLastRar
Clang-cl fails to select the correct function and instead errors Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
2022-10-10feat: add clear metadata actionSefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-09-10fix: emit signals when aborting NetJobflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-07Merge pull request #966 from flowln/refactor_tasksflow
Reduce code duplication in tasks, fix some bugs and add some tests
2022-09-05Merge pull request #1034 from Scrumplex/detect-performance-featuresSefa Eyeoglu
2022-08-28refactor: make NetJob inherit from ConcurrentTask as well!flow
Avoids lots of code duplication Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-21feat: add eternal cache entriesflow
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>
2022-08-11Merge pull request #920 from flowln/metacache_fixtimoreo
2022-08-08refactor: store current capabilitiesSefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-23Merge pull request #877 from Scrumplex/refactor-offline-accountsSefa Eyeoglu
2022-07-23fix: treat accounts as offline, if auth servers are downSefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-21change(cache): use cache-specific http headers for their lifetimeflow
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>
2022-07-17fix: allow aborting upload tasksflow
This maintains the same behaviour as the Download task. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-16fix: add expiration time to cache entriesflow
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>
2022-07-11Merge pull request #678 from Scrumplex/improvements-around-proprietary-servicesSefa Eyeoglu
2022-07-10chore: update license headersSefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-10fix: fix slots for Qt 6Sefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-10refactor: fix deprecation up to Qt 6Sefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-10refactor: fix deprecation up to Qt 5.15Sefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-08chore: add missing license headersSefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-08feat: track capabilities of applicationSefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-08refactor: rename references to CurseForge to FlameSefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-06Revert "fix: remove updater if it is not used"Sefa Eyeoglu
This reverts commit 2ff0aa09e35eb6910ef0a030ea41f84a1ed95782. Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-06-12chore: add license headersSefa Eyeoglu
2022-06-12fix: remove updater if it is not usedSefa Eyeoglu
2022-06-04feat: custom user-agentRyan Cao
2022-05-28Rework curseforge download (#611)timoreo22
* 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
2022-05-21Change paste settings and add copyright headersLenny McLennington
- 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.
2022-05-21Support paste.gg, hastebin, and mclo.gsLenny McLennington
2022-05-21Merge pull request #500 from flowln/net_refactorSefa Eyeoglu
Refactor a little the code in `launcher/net/` files
2022-05-20Add cursefrog key overridedada513
2022-05-17chore: remove copyright from files i didnt mess withflow
This is what happens when you auto-pilot stuff xdd
2022-05-12chore: add polymc license headers to launcher/net filesflow
2022-05-12fix: abort and fail logic in tasksflow
Also sets up correctly the status connections
2022-05-12refactor: more net cleanupflow
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
2022-05-12refactor: remove some superfluous signalsflow
Since now we're inheriting from Task, some signals can be reused.
2022-05-12refactor: organize a little more the code in launcher/net/flow
This also reduces some code duplication by using some Task logic in NetAction.
2022-05-08adopt changes from #497 remappedRyan Cao
2022-01-23support paste.polymc.orgswirl
2022-01-19PasteUpload: Trim whitespace from response bodyLenny McLennington
2022-01-19PasteUpload task changed to use 0x0.st's protocolLenny McLennington
- 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.
2021-12-31NOISSUE fix build and change how NetJob is usedPetr Mrázek
Feed it network upfront...
2021-12-29GH-4299 Fix screenshot uploadJanrupf
2021-12-29GH-4299 Don't hard crash on when missing networkJanrupf
2021-11-21NOISSUE continue refactoring things to make tests passPetr Mrázek
2021-11-20NOISSUE Some happy little refactorsPetr Mrázek