mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-21 21:20:39 +02:00
Properly dispose
This commit is contained in:
parent
e5248cfaa2
commit
30842656a7
|
@ -55,7 +55,6 @@ namespace Emby.Server.Implementations.Data
|
||||||
DbFilePath,
|
DbFilePath,
|
||||||
DefaultConnectionFlags | ConnectionFlags.Create | ConnectionFlags.ReadWrite,
|
DefaultConnectionFlags | ConnectionFlags.Create | ConnectionFlags.ReadWrite,
|
||||||
null);
|
null);
|
||||||
SQLiteDatabaseConnectionBuilder.InMemory.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(_defaultWal))
|
if (string.IsNullOrWhiteSpace(_defaultWal))
|
||||||
|
|
|
@ -616,7 +616,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
GetSaveItemCommandText(),
|
GetSaveItemCommandText(),
|
||||||
"delete from AncestorIds where ItemId=@ItemId"
|
"delete from AncestorIds where ItemId=@ItemId"
|
||||||
});
|
}).ToList();
|
||||||
|
|
||||||
using (var saveItemStatement = statements[0])
|
using (var saveItemStatement = statements[0])
|
||||||
using (var deleteAncestorsStatement = statements[1])
|
using (var deleteAncestorsStatement = statements[1])
|
||||||
|
@ -2824,7 +2824,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
return connection.RunInTransaction(db =>
|
return connection.RunInTransaction(db =>
|
||||||
{
|
{
|
||||||
var result = new QueryResult<BaseItem>();
|
var result = new QueryResult<BaseItem>();
|
||||||
var statements = PrepareAllSafe(db, statementTexts);
|
var statements = PrepareAllSafe(db, statementTexts).ToList();
|
||||||
|
|
||||||
if (!isReturningZeroItems)
|
if (!isReturningZeroItems)
|
||||||
{
|
{
|
||||||
|
@ -3236,7 +3236,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
{
|
{
|
||||||
var result = new QueryResult<Guid>();
|
var result = new QueryResult<Guid>();
|
||||||
|
|
||||||
var statements = PrepareAllSafe(db, statementTexts);
|
var statements = PrepareAllSafe(db, statementTexts).ToList();
|
||||||
|
|
||||||
if (!isReturningZeroItems)
|
if (!isReturningZeroItems)
|
||||||
{
|
{
|
||||||
|
@ -5437,7 +5437,7 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
||||||
var list = new List<(BaseItem, ItemCounts)>();
|
var list = new List<(BaseItem, ItemCounts)>();
|
||||||
var result = new QueryResult<(BaseItem, ItemCounts)>();
|
var result = new QueryResult<(BaseItem, ItemCounts)>();
|
||||||
|
|
||||||
var statements = PrepareAllSafe(db, statementTexts);
|
var statements = PrepareAllSafe(db, statementTexts).ToList();
|
||||||
|
|
||||||
if (!isReturningZeroItems)
|
if (!isReturningZeroItems)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue