1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-21 18:22:30 +01:00

allow 'postprocessors' to be a single dict/str

do not require it to be a list with just one element

"postprocessors": "metadata"
"postprocessors": {"name": "metadata"}
This commit is contained in:
Mike Fährmann 2024-11-15 21:15:00 +01:00
parent c82f3db098
commit 1264fc518b
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -619,6 +619,8 @@ class DownloadJob(Job):
pp_opts = cfg("postprocessor-options")
pp_list = []
if isinstance(postprocessors, (dict, str)):
postprocessors = (postprocessors,)
for pp_dict in postprocessors:
if isinstance(pp_dict, str):
pp_dict = pp_conf.get(pp_dict) or {"name": pp_dict}