From 0f67a5ba2f9bc00a34f5fed5c18a74b40431b952 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Wed, 5 Jun 2024 10:43:24 +0200 Subject: [PATCH] Actually create readonly connection when asked --- Emby.Server.Implementations/Data/BaseSqliteRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Data/BaseSqliteRepository.cs b/Emby.Server.Implementations/Data/BaseSqliteRepository.cs index e0981fa92..a313d7cb3 100644 --- a/Emby.Server.Implementations/Data/BaseSqliteRepository.cs +++ b/Emby.Server.Implementations/Data/BaseSqliteRepository.cs @@ -100,7 +100,7 @@ namespace Emby.Server.Implementations.Data protected SqliteConnection GetConnection(bool readOnly = false) { - var connection = new SqliteConnection($"Filename={DbFilePath}"); + var connection = new SqliteConnection($"Filename={DbFilePath}" + (readOnly ? ";Mode=ReadOnly" : string.Empty)); connection.Open(); if (CacheSize.HasValue)