mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 22:13:06 +03:00
update transaction modes
This commit is contained in:
@@ -78,7 +78,7 @@ namespace Emby.Server.Implementations.Data
|
||||
|
||||
AddColumn(db, "userdata", "AudioStreamIndex", "int", existingColumnNames);
|
||||
AddColumn(db, "userdata", "SubtitleStreamIndex", "int", existingColumnNames);
|
||||
});
|
||||
}, TransactionMode);
|
||||
|
||||
ImportUserDataIfNeeded(connection);
|
||||
}
|
||||
@@ -116,7 +116,7 @@ namespace Emby.Server.Implementations.Data
|
||||
statement.TryBind("@IsUserDataImported", true);
|
||||
statement.MoveNext();
|
||||
}
|
||||
});
|
||||
}, TransactionMode);
|
||||
}
|
||||
|
||||
private void ImportUserData(IDatabaseConnection connection, string file)
|
||||
@@ -128,7 +128,7 @@ namespace Emby.Server.Implementations.Data
|
||||
connection.RunInTransaction(db =>
|
||||
{
|
||||
db.Execute("REPLACE INTO userdata(" + columns + ") SELECT " + columns + " FROM UserDataBackup.userdata;");
|
||||
});
|
||||
}, TransactionMode);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -197,7 +197,7 @@ namespace Emby.Server.Implementations.Data
|
||||
connection.RunInTransaction(db =>
|
||||
{
|
||||
SaveUserData(db, userId, key, userData);
|
||||
});
|
||||
}, TransactionMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -271,7 +271,7 @@ namespace Emby.Server.Implementations.Data
|
||||
{
|
||||
SaveUserData(db, userId, userItemData.Key, userItemData);
|
||||
}
|
||||
});
|
||||
}, TransactionMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user