Skip to content

Commit

Permalink
Merge pull request #4 from karuboniru/master
Browse files Browse the repository at this point in the history
Add immutable flag to sql path
  • Loading branch information
URenko authored Jan 11, 2024
2 parents 3a9f3e1 + 58f8cdc commit eb8eb64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion comiclib/scanner/30-importEHdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(self) -> None:
if Path(settings.importEHdb_API_DUMP_PATH).exists():
logger.info('Loading ehentai metadata database, please wait...')
# do it in readonly mode, to maintain a readonly container image
self.con = sqlite3.connect("file:"+settings.importEHdb_API_DUMP_PATH+"?mode=ro", uri=True, check_same_thread=False)
self.con = sqlite3.connect("file:"+settings.importEHdb_API_DUMP_PATH+"?mode=ro&immutable=1", uri=True, check_same_thread=False)
if settings.importEHdb_matchtitle:
self.db_title = {blur_title(row[0]): row[1] for row in self.con.execute("SELECT title, gid FROM gallery") if not row[0] is None}
self.db_title_jpn = {blur_title(row[0]): row[1] for row in self.con.execute("SELECT title_jpn, gid FROM gallery") if not row[0] is None}
Expand Down

0 comments on commit eb8eb64

Please sign in to comment.