[pp:metadata] add 'metadata-path' option (#6582)

https://github.com/mikf/gallery-dl/issues/6582#issuecomment-2781643835
This commit is contained in:
Mike Fährmann
2025-04-09 20:24:14 +02:00
parent a1bf71d0bd
commit edd90fbf02
3 changed files with 25 additions and 0 deletions

View File

@@ -555,6 +555,16 @@ class MetadataTest(BasePostprocessorTest):
path = self.pathfmt.realdirectory + "test_file__meta_.data"
m.assert_called_once_with(path, "w", encoding="utf-8")
def test_metadata_meta_path(self):
self._create({
"metadata-path": "_meta_path",
})
self._trigger()
self.assertEqual(self.pathfmt.kwdict["_meta_path"],
self.pathfmt.realpath + ".json")
def test_metadata_stdout(self):
self._create({"filename": "-", "indent": None, "sort": True})