aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/ytdl.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2025-12-20 05:49:11 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2025-12-20 05:49:11 -0500
commitc586ea4b3c871f5696626f9820e8c88a4e78f4a6 (patch)
treee6d7bae96282c3d147159f091d451e53bdaa2efe /gallery_dl/ytdl.py
parent01a2bf622c31072d1322884584404b9bd59b28cc (diff)
parenta24ec1647aeac35a63b744ea856011ad6e06be3b (diff)
Update upstream source from tag 'upstream/1.31.1'
Update to upstream version '1.31.1' with Debian dir b5d91c25143175f933b1c69c7e82249cd7e145ab
Diffstat (limited to 'gallery_dl/ytdl.py')
-rw-r--r--gallery_dl/ytdl.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gallery_dl/ytdl.py b/gallery_dl/ytdl.py
index b7ee1ca..a4d8097 100644
--- a/gallery_dl/ytdl.py
+++ b/gallery_dl/ytdl.py
@@ -55,6 +55,8 @@ def construct_YoutubeDL(module, obj, user_opts, system_opts=None):
opts["min_filesize"] = text.parse_bytes(config("filesize-min"), None)
if opts.get("max_filesize") is None:
opts["max_filesize"] = text.parse_bytes(config("filesize-max"), None)
+ if opts.get("overwrites") is None and not config("skip", True):
+ opts["overwrites"] = True
if opts.get("ratelimit") is None:
if rate := config("rate"):
func = util.build_selection_func(rate, 0, text.parse_bytes)
@@ -262,7 +264,7 @@ def parse_command_line(module, argv):
else module.match_filter_func(opts.match_filter))
if cookiesfrombrowser := getattr(opts, "cookiesfrombrowser", None):
- pattern = util.re(r"""(?x)
+ pattern = text.re(r"""(?x)
(?P<name>[^+:]+)
(?:\s*\+\s*(?P<keyring>[^:]+))?
(?:\s*:\s*(?!:)(?P<profile>.+?))?
@@ -528,7 +530,7 @@ def legacy_postprocessors(opts, module, ytdlp, compat_opts):
if len(dur) == 2 and all(t is not None for t in dur):
remove_ranges.append(tuple(dur))
continue
- remove_chapters_patterns.append(util.re(regex))
+ remove_chapters_patterns.append(text.re(regex))
if opts.remove_chapters or sponsorblock_query:
postprocessors.append({
"key": "ModifyChapters",