diff options
| author | 2025-08-25 02:01:13 -0400 | |
|---|---|---|
| committer | 2025-08-25 02:01:13 -0400 | |
| commit | 3fd5caf1a580851dd8f4fb823b836f35adb5e606 (patch) | |
| tree | 2bf418b3f34638d18ed7399e1131708813be09aa /gallery_dl/config.py | |
| parent | bfa4cc26a1f9a69c03aa23aecc4043ea7e779282 (diff) | |
| parent | 1df55d9de48105dace9cc16f1511dba3c9a6da6f (diff) | |
Update upstream source from tag 'upstream/1.30.5'
Update to upstream version '1.30.5'
with Debian dir b55f90fa0d2f879e81fbc596c4db65d65264bf4b
Diffstat (limited to 'gallery_dl/config.py')
| -rw-r--r-- | gallery_dl/config.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gallery_dl/config.py b/gallery_dl/config.py index 1873634..33a3b95 100644 --- a/gallery_dl/config.py +++ b/gallery_dl/config.py @@ -169,6 +169,7 @@ def remap_categories(): cmap = ( ("coomerparty" , "coomer"), ("kemonoparty" , "kemono"), + ("giantessbooru", "sizebooru"), ("koharu" , "schalenetwork"), ("naver" , "naver-blog"), ("chzzk" , "naver-chzzk"), @@ -185,13 +186,13 @@ def remap_categories(): opts[new] = opts[old] -def load(files=None, strict=False, loads=util.json_loads): +def load(files=None, strict=False, loads=util.json_loads, conf=_config): """Load JSON configuration files""" for pathfmt in files or _default_configs: path = util.expand_path(pathfmt) try: with open(path, encoding="utf-8") as fp: - conf = loads(fp.read()) + config = loads(fp.read()) except OSError as exc: if strict: log.error(exc) @@ -202,17 +203,17 @@ def load(files=None, strict=False, loads=util.json_loads): if strict: raise SystemExit(2) else: - if not _config: - _config.update(conf) + if not conf: + conf.update(config) else: - util.combine_dict(_config, conf) + util.combine_dict(conf, config) _files.append(pathfmt) - if "subconfigs" in conf: - if subconfigs := conf["subconfigs"]: + if "subconfigs" in config: + if subconfigs := config["subconfigs"]: if isinstance(subconfigs, str): subconfigs = (subconfigs,) - load(subconfigs, strict, loads) + load(subconfigs, strict, loads, conf) def clear(): |
