aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/option.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2024-12-02 00:31:59 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2024-12-02 00:31:59 -0500
commit1981ccaaea6eab2cf32536ec5afe132a870914d8 (patch)
tree013f1e17d922d3a6abf7f57aa6a175c2ce5d93bc /gallery_dl/option.py
parentfc004701f923bb954a22c7fec2ae8d607e78cb2b (diff)
New upstream version 1.28.0.upstream/1.28.0
Diffstat (limited to 'gallery_dl/option.py')
-rw-r--r--gallery_dl/option.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/gallery_dl/option.py b/gallery_dl/option.py
index b38ad74..a3f78e5 100644
--- a/gallery_dl/option.py
+++ b/gallery_dl/option.py
@@ -461,6 +461,17 @@ def build_parser():
help="Client-side IP address to bind to",
)
networking.add_argument(
+ "-4", "--force-ipv4",
+ dest="source-address", nargs=0, action=ConfigConstAction,
+ const="0.0.0.0",
+ help="Make all connections via IPv4",
+ )
+ networking.add_argument(
+ "-6", "--force-ipv6",
+ dest="source-address", nargs=0, action=ConfigConstAction, const="::",
+ help="Make all connections via IPv6",
+ )
+ networking.add_argument(
"--no-check-certificate",
dest="verify", nargs=0, action=ConfigConstAction, const=False,
help="Disable HTTPS certificate validation",
@@ -792,4 +803,10 @@ def build_parser():
"&& convert * ../doc.pdf\""),
)
+ try:
+ # restore normal behavior when adding '-4' or '-6' as arguments
+ parser._has_negative_number_optionals.clear()
+ except Exception:
+ pass
+
return parser