mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-26 12:42:29 +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:
|
if self.postprocessors:
|
||||||
for pp in self.postprocessors:
|
for pp in self.postprocessors:
|
||||||
pp.finalize()
|
pp.finalize()
|
||||||
|
if self.archive:
|
||||||
|
self.archive.close()
|
||||||
|
|
||||||
def handle_skip(self):
|
def handle_skip(self):
|
||||||
self.out.skip(self.pathfmt.path)
|
self.out.skip(self.pathfmt.path)
|
||||||
|
@ -733,6 +733,7 @@ class DownloadArchive():
|
|||||||
def __init__(self, path, extractor):
|
def __init__(self, path, extractor):
|
||||||
con = sqlite3.connect(path)
|
con = sqlite3.connect(path)
|
||||||
con.isolation_level = None
|
con.isolation_level = None
|
||||||
|
self.close = con.close
|
||||||
self.cursor = con.cursor()
|
self.cursor = con.cursor()
|
||||||
self.cursor.execute("CREATE TABLE IF NOT EXISTS archive "
|
self.cursor.execute("CREATE TABLE IF NOT EXISTS archive "
|
||||||
"(entry PRIMARY KEY) WITHOUT ROWID")
|
"(entry PRIMARY KEY) WITHOUT ROWID")
|
||||||
|
Loading…
Reference in New Issue
Block a user