small corrections to gallery-dl-example.conf

use "'_reddit' in locals()"
instead of ""locals().get('_reddit')"
since the reddit metadata dict could be empty. The latter expression
would evaluate to False in that case, even though it has a reddit parent.
This commit is contained in:
Mike Fährmann
2021-10-16 20:50:39 +02:00
parent 3ecf4a9729
commit 80314e981b

View File

@@ -140,14 +140,14 @@
"reddit":
{
"#": "only spawn child extractors for links to specific sites",
"whitelist": ["imgur", "redgifs", "gfycat"],
"#": "put files from child extractors into the reddit directory",
"parent-directory": true,
"#": "transfer metadata to any child extractor as '_reddit'",
"parent-metadata": "_reddit",
"#": "only spawn child extractors for links to specific sites",
"whitelist": ["imgur", "redgifs", "gfycat"]
"parent-metadata": "_reddit"
},
"imgur":
@@ -155,28 +155,28 @@
"#": "use different directory and filename formats when coming from a reddit post",
"directory":
{
"locals().get('_reddit')": []
"'_reddit' in locals()": []
},
"filename":
{
"locals().get('_reddit')": "{_reddit[id]} {id}.{extension}",
"'_reddit' in locals()": "{_reddit[id]} {id}.{extension}",
"" : "{id}.{extension}"
}
},
"tumblr":
{
"posts": "all",
"posts" : "all",
"external": false,
"reblogs": false,
"inline": true,
"reblogs" : false,
"inline" : true,
"#": "use special settings when downloading liked posts",
"likes":
{
"posts": "video,photo,link",
"posts" : "video,photo,link",
"external": true,
"reblogs": true
"reblogs" : true
}
},