aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Data/SqliteUserRepository.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2019-08-19 17:03:21 +0200
committerBond_009 <bond.009@outlook.com>2019-08-19 17:03:21 +0200
commit3fd489d1cb85d654b4b32d2ffd901832a38adbe9 (patch)
tree2b2c40549d6f893a18ff3611fe0e1afd4f6f9952 /Emby.Server.Implementations/Data/SqliteUserRepository.cs
parentc8474f734c779d61444a6e48de9ff7825d7904c9 (diff)
Upgrade SQLitePCL to v2
Diffstat (limited to 'Emby.Server.Implementations/Data/SqliteUserRepository.cs')
-rw-r--r--Emby.Server.Implementations/Data/SqliteUserRepository.cs15
1 files changed, 5 insertions, 10 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteUserRepository.cs b/Emby.Server.Implementations/Data/SqliteUserRepository.cs
index d6d250fb3..11629b389 100644
--- a/Emby.Server.Implementations/Data/SqliteUserRepository.cs
+++ b/Emby.Server.Implementations/Data/SqliteUserRepository.cs
@@ -35,9 +35,8 @@ namespace Emby.Server.Implementations.Data
public string Name => "SQLite";
/// <summary>
- /// Opens the connection to the database
+ /// Opens the connection to the database.
/// </summary>
- /// <returns>Task.</returns>
public void Initialize()
{
using (var connection = GetConnection())
@@ -180,14 +179,10 @@ namespace Emby.Server.Implementations.Data
var id = row[0].ToInt64();
var guid = row[1].ReadGuidFromBlob();
- using (var stream = new MemoryStream(row[2].ToBlob()))
- {
- stream.Position = 0;
- var user = _jsonSerializer.DeserializeFromStream<User>(stream);
- user.InternalId = id;
- user.Id = guid;
- return user;
- }
+ var user = _jsonSerializer.DeserializeFromString<User>(row.GetString(2));
+ user.InternalId = id;
+ user.Id = guid;
+ return user;
}
/// <summary>