aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/postprocessor
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2023-03-31 07:25:02 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2023-03-31 07:25:02 -0400
commit11452b643c44c3002fe2d6c296f6772d9b4343af (patch)
tree546a9ff546e4e2d2b1b12a3c4d81de2f784d1ba1 /gallery_dl/postprocessor
parent0672d553693faed2d310aa24684d75dca994293a (diff)
parent09e426350409d45e7f7a8ff369f8d8aa9eec0fe4 (diff)
Update upstream source from tag 'upstream/1.25.1'
Update to upstream version '1.25.1' with Debian dir ec0bb328aeea2e22bc72835837b5b92e8d6d00bf
Diffstat (limited to 'gallery_dl/postprocessor')
-rw-r--r--gallery_dl/postprocessor/metadata.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/gallery_dl/postprocessor/metadata.py b/gallery_dl/postprocessor/metadata.py
index 9667a41..714f4fe 100644
--- a/gallery_dl/postprocessor/metadata.py
+++ b/gallery_dl/postprocessor/metadata.py
@@ -87,6 +87,7 @@ class MetadataPP(PostProcessor):
self.omode = options.get("open", omode)
self.encoding = options.get("encoding", "utf-8")
self.private = options.get("private", False)
+ self.skip = options.get("skip", False)
def run(self, pathfmt):
archive = self.archive
@@ -96,6 +97,9 @@ class MetadataPP(PostProcessor):
directory = self._directory(pathfmt)
path = directory + self._filename(pathfmt)
+ if self.skip and os.path.exists(path):
+ return
+
try:
with open(path, self.omode, encoding=self.encoding) as fp:
self.write(fp, pathfmt.kwdict)