Skip to content

Commit

Permalink
set pseudo extension for Metadata messages (#865)
Browse files Browse the repository at this point in the history
This prevents pathfmt.filename from potentially being empty.
  • Loading branch information
mikf committed Jul 4, 2020
1 parent d0cd86e commit d5bfb0b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions gallery_dl/extractor/patreon.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ def items(self):
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),
Expand Down
1 change: 1 addition & 0 deletions gallery_dl/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ def handle_metadata(self, kwdict):
postprocessors = self.postprocessors

if postprocessors:
kwdict["extension"] = "metadata"
pathfmt = self.pathfmt
pathfmt.set_filename(kwdict)
for pp in postprocessors:
Expand Down

0 comments on commit d5bfb0b

Please sign in to comment.