set pseudo extension for Metadata messages (#865)

This prevents pathfmt.filename from potentially being empty.
This commit is contained in:
Mike Fährmann
2020-07-04 21:55:12 +02:00
parent d0cd86e0d5
commit d5bfb0b38c
2 changed files with 2 additions and 2 deletions

View File

@@ -38,8 +38,7 @@ class PatreonExtractor(Extractor):
hashes = set()
yield Message.Directory, post
yield Message.Metadata, text.nameext_from_url(
post["creator"].get("image_url", ""), post)
yield Message.Metadata, post
for kind, url, name in itertools.chain(
self._postfile(post),

View File

@@ -281,6 +281,7 @@ class DownloadJob(Job):
postprocessors = self.postprocessors
if postprocessors:
kwdict["extension"] = "metadata"
pathfmt = self.pathfmt
pathfmt.set_filename(kwdict)
for pp in postprocessors: