set pseudo extension for Metadata messages (#865)
This prevents pathfmt.filename from potentially being empty.
This commit is contained in:
@@ -38,8 +38,7 @@ class PatreonExtractor(Extractor):
|
|||||||
hashes = set()
|
hashes = set()
|
||||||
|
|
||||||
yield Message.Directory, post
|
yield Message.Directory, post
|
||||||
yield Message.Metadata, text.nameext_from_url(
|
yield Message.Metadata, post
|
||||||
post["creator"].get("image_url", ""), post)
|
|
||||||
|
|
||||||
for kind, url, name in itertools.chain(
|
for kind, url, name in itertools.chain(
|
||||||
self._postfile(post),
|
self._postfile(post),
|
||||||
|
|||||||
@@ -281,6 +281,7 @@ class DownloadJob(Job):
|
|||||||
postprocessors = self.postprocessors
|
postprocessors = self.postprocessors
|
||||||
|
|
||||||
if postprocessors:
|
if postprocessors:
|
||||||
|
kwdict["extension"] = "metadata"
|
||||||
pathfmt = self.pathfmt
|
pathfmt = self.pathfmt
|
||||||
pathfmt.set_filename(kwdict)
|
pathfmt.set_filename(kwdict)
|
||||||
for pp in postprocessors:
|
for pp in postprocessors:
|
||||||
|
|||||||
Reference in New Issue
Block a user