|
|
|
@ -97,6 +97,7 @@ namespace Emby.Server.Implementations.Data
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The write connection.</value>
|
|
|
|
|
protected SQLiteDatabaseConnection WriteConnection { get; set; }
|
|
|
|
|
|
|
|
|
|
protected SQLiteDatabaseConnection ReadConnection { get; set; }
|
|
|
|
|
|
|
|
|
|
protected ManagedConnection GetConnection(bool readOnly = false)
|
|
|
|
@ -104,7 +105,7 @@ namespace Emby.Server.Implementations.Data
|
|
|
|
|
if (readOnly)
|
|
|
|
|
{
|
|
|
|
|
ReadConnection ??= SQLite3.Open(DbFilePath, ConnectionFlags.ReadOnly, null);
|
|
|
|
|
return new ManagedConnection(ReadConnection, null!);
|
|
|
|
|
return new ManagedConnection(ReadConnection, null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
WriteLock.Wait();
|
|
|
|
|