mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-25 20:22:36 +01:00
add '-T/--terminate' command-line option (#1399)
This commit is contained in:
parent
6ecb710a7f
commit
dfe1e09df0
@ -126,6 +126,8 @@ def main():
|
||||
config.set((), "postprocessors", args.postprocessors)
|
||||
if args.abort:
|
||||
config.set((), "skip", "abort:" + str(args.abort))
|
||||
if args.terminate:
|
||||
config.set((), "skip", "terminate:" + str(args.terminate))
|
||||
for opts in args.options:
|
||||
config.set(*opts)
|
||||
|
||||
|
@ -203,13 +203,6 @@ def build_parser():
|
||||
help=("Maximum number of retries for failed HTTP requests "
|
||||
"or -1 for infinite retries (default: 4)"),
|
||||
)
|
||||
downloader.add_argument(
|
||||
"-A", "--abort",
|
||||
dest="abort", metavar="N", type=int,
|
||||
help=("Abort extractor run after N consecutive file downloads have "
|
||||
"been skipped, e.g. if files with the same filename already "
|
||||
"exist"),
|
||||
)
|
||||
downloader.add_argument(
|
||||
"--http-timeout",
|
||||
dest="timeout", metavar="SECONDS", type=float, action=ConfigAction,
|
||||
@ -301,7 +294,19 @@ def build_parser():
|
||||
"--download-archive",
|
||||
dest="archive", metavar="FILE", action=ConfigAction,
|
||||
help=("Record all downloaded files in the archive file and "
|
||||
"skip downloading any file already in it."),
|
||||
"skip downloading any file already in it"),
|
||||
)
|
||||
selection.add_argument(
|
||||
"-A", "--abort",
|
||||
dest="abort", metavar="N", type=int,
|
||||
help=("Stop current extractor run "
|
||||
"after N consecutive file downloads were skipped"),
|
||||
)
|
||||
selection.add_argument(
|
||||
"-T", "--terminate",
|
||||
dest="terminate", metavar="N", type=int,
|
||||
help=("Stop current and parent extractor runs "
|
||||
"after N consecutive file downloads were skipped"),
|
||||
)
|
||||
selection.add_argument(
|
||||
"--range",
|
||||
|
Loading…
Reference in New Issue
Block a user