Skip to content

Commit

Permalink
small corrections to gallery-dl-example.conf
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mikf committed Oct 16, 2021
1 parent 3ecf4a9 commit 80314e9
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions docs/gallery-dl-example.conf
Original file line number Diff line number Diff line change
Expand Up @@ -140,43 +140,43 @@

"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":
{
"#": "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
}
},

Expand Down

0 comments on commit 80314e9

Please sign in to comment.