From f33ac885a62a2c51ab3cfcf9e4e09799aca07be6 Mon Sep 17 00:00:00 2001 From: Gray Manley Date: Sun, 19 Feb 2023 00:09:05 -0600 Subject: [PATCH] [pixiv] fix tag write when set to original --- gallery_dl/postprocessor/metadata.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gallery_dl/postprocessor/metadata.py b/gallery_dl/postprocessor/metadata.py index 3f5d1d6f..9667a413 100644 --- a/gallery_dl/postprocessor/metadata.py +++ b/gallery_dl/postprocessor/metadata.py @@ -184,6 +184,13 @@ class MetadataPP(PostProcessor): for taglist in taglists: extend(taglist) tags.sort() + elif all(isinstance(e, dict) for e in tags): + taglists = tags + tags = [] + extend = tags.extend + for tagdict in taglists: + extend([x for x in tagdict.values() if x is not None]) + tags.sort() fp.write("\n".join(tags) + "\n")