Pause and resume
Ctrl+C saves the state; resuming continues where the download stopped, when the source allows it.
Pausing
During a download, Ctrl+C:
- stops the threads cleanly;
- writes the state file
<file>.part.turbodlnext to the partial file; - prints the resume command and exits with code 130.
A second Ctrl+C quits immediately.
Resuming
turbodl-cli resume "Downloads/Video/movie.mkv.part.turbodl"
Running the original command again works too: TurboDL finds the existing state.
When is resuming possible?
Partial resume needs two conditions:
- the server accepts byte ranges (
206 Partial Contentanswer); - the remote file has not changed: the
ETagandLast-Modifiedare compared with the saved ones.
If the file changed, TurboDL says so and starts over from the beginning, so two versions are never mixed. If the server does not support byte ranges, it warns you from the start: "This source cannot be resumed".
What about secrets?
The state file contains no secret:
${VAR}values are kept as is and expanded again when resuming;- sensitive literal values (
Authorization,Cookie,Proxy-Authorization, password) are never written: pass them again when resuming with-H,-bor-u.