Commit Graph

66 Commits

Author SHA1 Message Date
Rachel Powers
cdccb25fe3 feat: add download size to download details alongside speed
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-05-01 10:48:00 -07:00
Rachel Powers
b6452215c1 feat: add details signal to Task
feat: add details to mod pack downloading
feat: add logging rule sloading form `ligging.ini at data path root
feat: add `launcher.task` `launcher.task.net` and `launcher.task.net.[down|up]load` logging categories
fix: add new subtask progress to the end of the lay out not the beginning (cuts down on flickering)

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-05-01 10:47:50 -07:00
Rachel Powers
f1028fa66d fix: properly map progress range
- doument PCRE used for URL compacting

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-05-01 10:47:31 -07:00
Rachel Powers
9d2f0e4dc8 feat: Propogated subtask progress
Oh boy this is big.

> TaskStepProgress struct is now QMetaObject compatabile and can be sent through signals
> Task now has a method to propogates sub task progress it must be signal bound by each task containing a task wishing to report progress of it's children.
> Downloads report speed
> Tasks now have UUIDS to track them
  - use when reporting
  - use when logging
  - use when storeing them or objects related to them

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-05-01 10:47:20 -07:00
Rachel Powers
f997529cd4 feat: better task tracking
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-05-01 10:45:34 -07:00
TheKodeToad
76f66148db Apply flowln's suggestion
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2023-03-05 18:21:24 +00:00
TheKodeToad
4efbf22089 Prism-ify more license headers
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2023-03-02 10:19:42 +00:00
TheKodeToad
1f3d18ec12 Replace with exact match and add TODO to improve
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2023-03-02 09:26:00 +00:00
TheKodeToad
1feb630520 Allow custom Modrinth API token
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2023-03-01 14:24:56 +00:00
flow
29f7ea752f
refactor: make shared_qobject_ptr ctor explicit
This turns issues like creating two shared ptrs from a single raw ptr
from popping up at runtime, instead making them a compile error.

Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-25 16:57:51 -03:00
Sefa Eyeoglu
6e841a3b7e
Merge branch 'develop' into remove-updater
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2023-01-24 14:40:17 +01:00
flow
6a18079953
refactor: generalize mod models and APIs to resources
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>
2023-01-13 16:23:00 -03:00
flow
81fedbf03c
refactor(Tasks): remove 'm_total_size' from ConcurrentTask
We can use the queues directly instead.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-12-17 13:10:19 -03:00
Sefa Eyeoglu
fdbd8d9d2b
refactor: remove old updater
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-11-21 16:18:05 +01:00
TheLastRar
472d931b4b Prefix member variables in HttpMetaCache
MSVC warns about shadowing variables

Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
2022-11-14 19:05:56 +00:00
TheLastRar
e29259cd55 Fix: Resolve ambiguous overload errors
Clang-cl fails to select the correct function and instead errors

Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
2022-11-04 18:11:39 +00:00
Sefa Eyeoglu
71f3c6b461
feat: add clear metadata action
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-10-10 12:48:25 +02:00
flow
a091245793
fix: emit signals when aborting NetJob
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-10 09:10:16 -03:00
flow
8e3f5c3305
Merge pull request #966 from flowln/refactor_tasks
Reduce code duplication in tasks, fix some bugs and add some tests
2022-09-07 08:26:28 -03:00
Sefa Eyeoglu
8e3356f11a
Merge pull request #1034 from Scrumplex/detect-performance-features 2022-09-05 17:45:17 +02:00
flow
7b6d269904
refactor: make NetJob inherit from ConcurrentTask as well!
Avoids lots of code duplication

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28 16:29:01 -03:00
flow
6be59b53f1
feat: add eternal cache entries
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-21 13:47:49 -03:00
timoreo
1a5986abe0
Merge pull request #920 from flowln/metacache_fix 2022-08-11 07:32:43 +02:00
Sefa Eyeoglu
f873cd5b1a
refactor: store current capabilities
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-08-08 21:16:37 +02:00
Sefa Eyeoglu
c65f5f7728
Merge pull request #877 from Scrumplex/refactor-offline-accounts 2022-07-23 13:54:36 +02:00
Sefa Eyeoglu
2e94562f79
fix: treat accounts as offline, if auth servers are down
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-23 12:38:01 +02:00
flow
ab6e1b112b
change(cache): use cache-specific http headers for their lifetime
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-21 19:19:24 -03:00
flow
91776311c7
fix: allow aborting upload tasks
This maintains the same behaviour as the Download task.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:41 -03:00
flow
ec87a8ddfc
fix: add expiration time to cache entries
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-16 21:25:28 -03:00
Sefa Eyeoglu
8f4d7ac655
Merge pull request #678 from Scrumplex/improvements-around-proprietary-services 2022-07-11 14:56:09 +02:00
Sefa Eyeoglu
3b4539de79
chore: update license headers
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-10 12:19:15 +02:00
Sefa Eyeoglu
15c5bbcf22
fix: fix slots for Qt 6
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-10 12:19:15 +02:00
Sefa Eyeoglu
c363423718
refactor: fix deprecation up to Qt 6
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-10 12:19:15 +02:00
Sefa Eyeoglu
984692dc62
refactor: fix deprecation up to Qt 5.15
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-10 12:17:52 +02:00
Sefa Eyeoglu
962923bbce
chore: add missing license headers
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-08 16:25:03 +02:00
Sefa Eyeoglu
4103948132
feat: track capabilities of application
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-08 16:25:03 +02:00
Sefa Eyeoglu
8a1a583afe
refactor: rename references to CurseForge to Flame
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-08 16:25:03 +02:00
Sefa Eyeoglu
e210a4b244
Revert "fix: remove updater if it is not used"
This reverts commit 2ff0aa09e3.

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-06 18:13:51 +02:00
Sefa Eyeoglu
a4ef0940ed
chore: add license headers 2022-06-12 13:50:58 +02:00
Sefa Eyeoglu
2ff0aa09e3
fix: remove updater if it is not used 2022-06-12 13:39:47 +02:00
Ryan Cao
25ab121e42
feat: custom user-agent 2022-06-04 15:33:17 +08:00
timoreo22
699ad316f0
Rework curseforge download (#611)
* 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-28 21:53:12 +02:00
Lenny McLennington
caf6d02728
Change paste settings and add copyright headers
- 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-21 17:30:09 +01:00
Lenny McLennington
35f71f5793
Support paste.gg, hastebin, and mclo.gs 2022-05-21 17:28:22 +01:00
Sefa Eyeoglu
b4707f46ad
Merge pull request #500 from flowln/net_refactor
Refactor a little the code in `launcher/net/` files
2022-05-21 12:06:34 +02:00
dada513
2847cefff7
Add cursefrog key override 2022-05-20 19:56:27 +02:00
flow
96deb5b09d
chore: remove copyright from files i didnt mess with
This is what happens when you auto-pilot stuff xdd
2022-05-17 06:36:30 -03:00
flow
0bce08d30f
chore: add polymc license headers to launcher/net files 2022-05-12 18:11:55 -03:00
flow
57d65177c8
fix: abort and fail logic in tasks
Also sets up correctly the status connections
2022-05-12 18:11:55 -03:00
flow
040ee919e5
refactor: more net cleanup
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-12 18:11:55 -03:00