diff options
| author | 2019-08-26 19:34:45 -0400 | |
|---|---|---|
| committer | 2019-08-26 19:34:45 -0400 | |
| commit | b75d158d014d6c43d7d785c46c9372a9cf84d144 (patch) | |
| tree | 7dca4a7e61fe8b6e2bff2142fc19891e783a7d6d /gallery_dl/postprocessor/metadata.py | |
| parent | 64ad8e7bd15df71ab1116eede414558631bcad32 (diff) | |
New upstream version 1.10.2upstream/1.10.2
Diffstat (limited to 'gallery_dl/postprocessor/metadata.py')
| -rw-r--r-- | gallery_dl/postprocessor/metadata.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gallery_dl/postprocessor/metadata.py b/gallery_dl/postprocessor/metadata.py index 77be9c7..467ef11 100644 --- a/gallery_dl/postprocessor/metadata.py +++ b/gallery_dl/postprocessor/metadata.py @@ -36,15 +36,14 @@ class MetadataPP(PostProcessor): def run(self, pathfmt): path = "{}.{}".format(pathfmt.realpath, self.extension) with open(path, "w", encoding="utf-8") as file: - self.write(file, pathfmt) + self.write(file, pathfmt.kwdict) - def _write_custom(self, file, pathfmt): - output = self.formatter.format_map(pathfmt.keywords) + def _write_custom(self, file, kwdict): + output = self.formatter.format_map(kwdict) file.write(output) - def _write_tags(self, file, pathfmt): - kwds = pathfmt.keywords - tags = kwds.get("tags") or kwds.get("tag_string") + def _write_tags(self, file, kwdict): + tags = kwdict.get("tags") or kwdict.get("tag_string") if not tags: return @@ -58,8 +57,8 @@ class MetadataPP(PostProcessor): file.write("\n".join(tags)) file.write("\n") - def _write_json(self, file, pathfmt): - util.dump_json(pathfmt.keywords, file, self.ascii, self.indent) + def _write_json(self, file, kwdict): + util.dump_json(kwdict, file, self.ascii, self.indent) __postprocessor__ = MetadataPP |
