1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-25 04:02:32 +01:00

add 'archive-prefix' option (#1711)

This commit is contained in:
Mike Fährmann 2021-07-20 19:59:42 +02:00
parent c3b5c88b04
commit 13d4045a8a
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 13 additions and 3 deletions

View File

@ -569,6 +569,16 @@ Description
.. __: https://docs.python.org/3/library/string.html#format-string-syntax
extractor.*.archive-prefix
--------------------------
Type
``string``
Default
``"{category}"``
Description
Prefix for archive IDs.
extractor.*.postprocessors
--------------------------
Type

View File

@ -1076,9 +1076,9 @@ class DownloadArchive():
# fallback for missing WITHOUT ROWID support (#553)
self.cursor.execute("CREATE TABLE IF NOT EXISTS archive "
"(entry PRIMARY KEY)")
self.keygen = (extractor.category + extractor.config(
"archive-format", extractor.archive_fmt)
self.keygen = (
extractor.config("archive-prefix", extractor.category) +
extractor.config("archive-format", extractor.archive_fmt)
).format_map
def check(self, kwdict):