Open reference database read-only in filename matcher
This commit is contained in:
@ -281,7 +281,9 @@ def load_movies(database_file: Path) -> list[Movie]:
|
|||||||
f"Database file does not exist: {database_file}"
|
f"Database file does not exist: {database_file}"
|
||||||
)
|
)
|
||||||
|
|
||||||
with sqlite3.connect(database_file) as connection:
|
database_uri = f"{database_file.resolve().as_uri()}?mode=ro"
|
||||||
|
|
||||||
|
with sqlite3.connect(database_uri, uri=True) as connection:
|
||||||
connection.row_factory = sqlite3.Row
|
connection.row_factory = sqlite3.Row
|
||||||
|
|
||||||
movie_rows = connection.execute(
|
movie_rows = connection.execute(
|
||||||
|
|||||||
Reference in New Issue
Block a user