From 3fd489d1cb85d654b4b32d2ffd901832a38adbe9 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Mon, 19 Aug 2019 17:03:21 +0200 Subject: Upgrade SQLitePCL to v2 --- Emby.Server.Implementations/Data/SqliteUserRepository.cs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'Emby.Server.Implementations/Data/SqliteUserRepository.cs') 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"; /// - /// Opens the connection to the database + /// Opens the connection to the database. /// - /// Task. 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(stream); - user.InternalId = id; - user.Id = guid; - return user; - } + var user = _jsonSerializer.DeserializeFromString(row.GetString(2)); + user.InternalId = id; + user.Id = guid; + return user; } /// -- cgit v1.2.3