feat: resumable downloads with cache, abort dialog, and Range-error recovery - #197
Closed
AvengerAnubis wants to merge 3 commits into
Closed
feat: resumable downloads with cache, abort dialog, and Range-error recovery#197AvengerAnubis wants to merge 3 commits into
AvengerAnubis wants to merge 3 commits into
Conversation
|
Question, why are you submitting this here? This is just a fork of Prism Launcher. Usually, it doesn't add "big" features on it's own. Maybe you should submit this at the Prism Launcher PRs? |
Author
|
I'll try it maybe one day, gonna need to fork the original though. Forked this launcher for my own sake, and added this feature cause I wasn't able to download any large modpacks, poor internet connection hits hard, and thought why not pull request it. |
AvengerAnubis
force-pushed
the
feature/download-resume-cache
branch
from
July 10, 2026 11:07
d4190f7 to
23124a2
Compare
Signed-off-by: Avenger Anubis (Ilya) <avenger.anubis@gmail.com> Assisted-by: opencode:deepseek-v4-flash-free
Signed-off-by: Avenger Anubis (Ilya) <avenger.anubis@gmail.com> Assisted-by: opencode:deepseek-v4-flash-free
…retry 404/416 on ranged requests Signed-off-by: Avenger Anubis (Ilya) <avenger.anubis@gmail.com> Assisted-by: opencode:deepseek-v4-flash-free
AvengerAnubis
force-pushed
the
feature/download-resume-cache
branch
from
July 10, 2026 11:39
23124a2 to
dac33a6
Compare
Author
|
made a pull request to PrismLauncher, may as well close this one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds three related features to the download system:
1. Resumable downloads with partial file support
ResumingFileSink— a new sink that downloads to a.partfile,sets
RangeandAccept-Rangesheaders so interrupted downloads can resumeDownloadCache— stores completed downloads keyed by URL hash,promotePart()copies the final file to the cache directory on success,serveFromCache()restores it on re-download with validator checksum verificationa fresh download
2. Abort confirmation dialog
QMessageBoxasks whetherto delete the cached
.partfile (Yes/No)NetJob::deleteCachedDownloads()cleans up all cached artifacts for the job3. Range-error recovery (404/416 on resumed downloads)
404or416when aRangerequestrefers to a stale or invalid offset
NetRequest::downloadError()now detects these status codes on resumabledownloads, deletes the stale
.partviadeleteCache(), and retries oncefrom scratch without
RangeFiles changed
launcher/net/ResumingFileSink.{h,cpp}— new sink, cache-hit validation,hasUsedRange()detection,deleteCache()launcher/net/DownloadCache.{h,cpp}— cache storage,promotePart(),serveFromCache(), metadata managementlauncher/net/NetRequest.{h,cpp}—deleteCachedDownload(), 404/416 retrylauncher/net/NetJob.{h,cpp}—deleteCachedDownloads()iterates all subtaskslauncher/net/Download.{h,cpp}— wire up cache in existing downloadslauncher/net/ApiDownload.cpp— pass cache throughlauncher/ui/dialogs/ProgressDialog.cpp— abort confirmation dialoglauncher/ui/pages/global/LauncherPage.{cpp,ui}— cache settings UIlauncher/Application.{h,cpp},launcher/CMakeLists.txt— wiring.gitignore— ignore local project files