add options to control usage of .part files (#29)

- '--no-part' command line option to disable them
- 'downloader.http.part' and 'downloader.text.part' config options

Disabling .part files restores the behaviour of the old downloader
implementation.
This commit is contained in:
Mike Fährmann
2017-10-24 23:33:44 +02:00
parent 158e60ee89
commit 963670d73b
7 changed files with 81 additions and 21 deletions

View File

@@ -145,6 +145,11 @@ def build_parser():
metavar="SECONDS", action=ConfigAction, dest="timeout", type=float,
help="Timeout for HTTP connections (defaut: 30s)",
)
downloader.add_argument(
"--no-part",
action=ConfigConstAction, nargs=0, dest="part", const=False,
help="Do not use .part files",
)
downloader.add_argument(
"--abort-on-skip",
action=ConfigConstAction, nargs=0, dest="skip", const="abort",