make archive keys user-configurable

This commit is contained in:
Mike Fährmann
2018-02-24 21:21:59 +01:00
parent 8f338347b6
commit 8cdce21dcb
2 changed files with 14 additions and 2 deletions

View File

@@ -549,7 +549,9 @@ class DownloadArchive():
self.cursor = con.cursor()
self.cursor.execute("CREATE TABLE IF NOT EXISTS archive "
"(entry PRIMARY KEY) WITHOUT ROWID")
self.keygen = (extractor.category + extractor.archive_fmt).format_map
self.keygen = (extractor.category + extractor.config(
"archive-format", extractor.archive_fmt)
).format_map
def check(self, kwdict):
"""Return True if item described by 'kwdict' exists in archive"""