Actually create readonly connection when asked

This commit is contained in:
Bond_009 2024-06-05 10:43:24 +02:00
parent 19fb00b5b7
commit 0f67a5ba2f

View File

@ -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)