1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-23 03:02:50 +01:00

[postprocessor:metadata] fix crash with 'extension-format'

Using the 'extension-format' option for events where no filename
extension is available caused a crash.

(fixes #1285)
This commit is contained in:
Mike Fährmann 2021-02-10 18:05:46 +01:00
parent 23be48427c
commit b3cd970d87
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -91,7 +91,7 @@ class MetadataPP(PostProcessor):
def _filename_extfmt(self, pathfmt):
kwdict = pathfmt.kwdict
ext = kwdict["extension"]
ext = kwdict.get("extension")
kwdict["extension"] = pathfmt.extension
kwdict["extension"] = pathfmt.prefix + self._extension_fmt(kwdict)
filename = pathfmt.build_filename()