change some config keys

directory_fmt     -> directory
filename_fmt      -> filename
download-original -> original
pull/13/head
Mike Fährmann 8 years ago
parent 2a32b12043
commit e87e6fbc67
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -1,16 +1,20 @@
{
"base-directory": "/tmp/",
"cache":
{
"file": "/tmp/.gallery-dl.cache"
},
"extractor":
{
"pixiv":
{
"user":
{
"directory_fmt": ["{category}", "{artist-id}"]
"directory": ["{category}", "{artist-id}"]
},
"bookmark":
{
"directory_fmt": ["{category}", "my bookmarks"]
"directory": ["{category}", "my bookmarks"]
},
"ugoira": true,
"username": null,
@ -25,7 +29,7 @@
{
"wait-min": 3,
"wait-max": 6,
"download-original": true,
"original": true,
"username": null,
"password": null
},
@ -41,7 +45,7 @@
},
"gelbooru":
{
"filename_fmt": "{category}_{id:>07}_{md5}.{extension}"
"filename": "{category}_{id:>07}_{md5}.{extension}"
}
}
}

@ -43,7 +43,7 @@ class ExhentaiGalleryExtractor(Extractor):
self.count = 0
self.gid, self.token = match.groups()
self.original = config.interpolate(
("extractor", "exhentai", "download-original"), True)
("extractor", "exhentai", "original"), True)
self.wait_min = config.interpolate(
("extractor", "exhentai", "wait-min"), 3)
self.wait_max = config.interpolate(

@ -17,10 +17,10 @@ class PathFormat():
if extractor.subcategory:
key.append(extractor.subcategory)
self.filename_fmt = config.interpolate(
key + ["filename_fmt"], default=extractor.filename_fmt
key + ["filename"], default=extractor.filename_fmt
)
self.directory_fmt = config.interpolate(
key + ["directory_fmt"], default=extractor.directory_fmt
key + ["directory"], default=extractor.directory_fmt
)
self.has_extension = False
self.keywords = {}

@ -48,7 +48,7 @@ def _generate_test(extr, tcase):
# enable selective testing for direct calls
skip = ["exhentai", "kissmanga", "mangafox"]
skip = ["3dbooru", "exhentai", "kissmanga", "mangafox"]
if __name__ == '__main__' and len(sys.argv) > 1:
extractors = [
extr for extr in extractor.extractors()

Loading…
Cancel
Save