From 1eaf1817e6172ca3e3decb7cd4a6d662595e8e34 Mon Sep 17 00:00:00 2001 From: Urban Date: Sun, 19 Jul 2026 16:14:16 +0200 Subject: [PATCH] Open reference database read-only in filename matcher --- scripts/match_filenames.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/match_filenames.py b/scripts/match_filenames.py index fd310f9..fa1c724 100755 --- a/scripts/match_filenames.py +++ b/scripts/match_filenames.py @@ -281,7 +281,9 @@ def load_movies(database_file: Path) -> list[Movie]: 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 movie_rows = connection.execute(