The Free Software Media System - Server Backend & API
Properly dispose
Bond-00930842656a7fb
diff --git a/Emby.Server.Implementations/Data/BaseSqliteRepository.cs b/Emby.Server.Implementations/Data/BaseSqliteRepository.csindex 33bbbbfe4f..db63f68d0f 100644--- a/Emby.Server.Implementations/Data/BaseSqliteRepository.cs+++ b/Emby.Server.Implementations/Data/BaseSqliteRepository.cs@@ -55,7 +55,6 @@ namespace Emby.Server.Implementations.DataDbFilePath,DefaultConnectionFlags | ConnectionFlags.Create | ConnectionFlags.ReadWrite,null);- SQLiteDatabaseConnectionBuilder.InMemory.}if (string.IsNullOrWhiteSpace(_defaultWal))diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.csindex e96b6ce3a0..a2f490c4a6 100644--- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs+++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs@@ -616,7 +616,7 @@ namespace Emby.Server.Implementations.Data{GetSaveItemCommandText(),"delete from AncestorIds where ItemId=@ItemId"- });+ }).ToList();using (var saveItemStatement = statements[0])using (var deleteAncestorsStatement = statements[1])@@ -2824,7 +2824,7 @@ namespace Emby.Server.Implementations.Datareturn connection.RunInTransaction(db =>{var result = new QueryResult<BaseItem>();- var statements = PrepareAllSafe(db, statementTexts);+ var statements = PrepareAllSafe(db, statementTexts).ToList();if (!isReturningZeroItems){@@ -3236,7 +3236,7 @@ namespace Emby.Server.Implementations.Data{var result = new QueryResult<Guid>();- var statements = PrepareAllSafe(db, statementTexts);+ var statements = PrepareAllSafe(db, statementTexts).ToList();if (!isReturningZeroItems){@@ -5437,7 +5437,7 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Typevar list = new List<(BaseItem, ItemCounts)>();var result = new QueryResult<(BaseItem, ItemCounts)>();- var statements = PrepareAllSafe(db, statementTexts);+ var statements = PrepareAllSafe(db, statementTexts).ToList();if (!isReturningZeroItems){