From 13d4045a8a5a6fd45cb20df399f44055b25f5cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 20 Jul 2021 19:59:42 +0200 Subject: [PATCH] add 'archive-prefix' option (#1711) --- docs/configuration.rst | 10 ++++++++++ gallery_dl/util.py | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index 623727af..3eb628b2 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -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 diff --git a/gallery_dl/util.py b/gallery_dl/util.py index b6dfb0dd..34621385 100644 --- a/gallery_dl/util.py +++ b/gallery_dl/util.py @@ -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):