simplify extractor constants

- single strings for URL patterns
- tuples instead of lists for 'directory_fmt' and 'test'
- single-tuple tests where applicable
This commit is contained in:
Mike Fährmann
2019-02-08 13:45:40 +01:00
parent 34bab080ae
commit 6284731107
84 changed files with 1080 additions and 1108 deletions

View File

@@ -26,7 +26,7 @@ class Extractor():
category = ""
subcategory = ""
categorytransfer = False
directory_fmt = ["{category}"]
directory_fmt = ("{category}",)
filename_fmt = "{name}.{extension}"
archive_fmt = ""
cookiedomain = ""
@@ -193,9 +193,9 @@ class Extractor():
class ChapterExtractor(Extractor):
subcategory = "chapter"
directory_fmt = [
directory_fmt = (
"{category}", "{manga}",
"{volume:?v/ />02}c{chapter:>03}{chapter_minor:?//}{title:?: //}"]
"{volume:?v/ />02}c{chapter:>03}{chapter_minor:?//}{title:?: //}")
filename_fmt = (
"{manga}_c{chapter:>03}{chapter_minor:?//}_{page:>03}.{extension}")
archive_fmt = (