feat: retry (resuming) or remove failed downloads - #10
Merged
Merged
Conversation
ghostcoder42
force-pushed
the
feature/download-retry
branch
3 times, most recently
from
September 5, 2026 10:23
a627a7c to
f37d720
Compare
Failed downloads could previously neither be retried nor removed (a
single dead "cancel" button), and killing the app mid-download lost
the task AND its partial file to the startup orphan cleanup. Now:
- downloading tasks have a Pause button; pausing stops the native task
at a clean boundary (pauseAsync) and the row shows Paused with
Resume/Delete — useful to prioritise bandwidth across tasks
- Retry/Resume continues from the bytes already on disk (resumeAsync +
Range) — verified on device with HTTP 206 responses — instead of
restarting from zero, and the progress bar continues where it stopped
- the task table is persisted (MMKV); on startup, tasks that died with
the process are restored as errored ("interrupted") while
user-paused ones stay paused, and the orphan cleanup spares their
partial files (the on-disk size is the resume offset — the native
layer truncates to it and sends Range: bytes=<size>-)
- when resuming is impossible (expired signed URL, range rejected, no
source) retry falls back to a fresh download with a re-resolved
source; if no source resolves the task stays errored and Delete
removes it with its partial file
- the watch-page button is store-driven (same story as the library row
and tile badges) and its retry works; the long-press menu offers
"Retry/Resume download" for errored/paused tiles
ghostcoder42
force-pushed
the
feature/download-retry
branch
from
September 5, 2026 10:26
f37d720 to
0515aed
Compare
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.
A failed download used to leave the library row with a single dead "cancel" button and silently blocked the watch-page retry behind an "already active" guard. Now: