mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-26 04:32:51 +01:00
close archive on job completion (#417)
This commit is contained in:
parent
5ac9732adc
commit
776e9e073f
@ -266,6 +266,8 @@ class DownloadJob(Job):
|
||||
if self.postprocessors:
|
||||
for pp in self.postprocessors:
|
||||
pp.finalize()
|
||||
if self.archive:
|
||||
self.archive.close()
|
||||
|
||||
def handle_skip(self):
|
||||
self.out.skip(self.pathfmt.path)
|
||||
|
@ -733,6 +733,7 @@ class DownloadArchive():
|
||||
def __init__(self, path, extractor):
|
||||
con = sqlite3.connect(path)
|
||||
con.isolation_level = None
|
||||
self.close = con.close
|
||||
self.cursor = con.cursor()
|
||||
self.cursor.execute("CREATE TABLE IF NOT EXISTS archive "
|
||||
"(entry PRIMARY KEY) WITHOUT ROWID")
|
||||
|
Loading…
Reference in New Issue
Block a user