aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-06-16 18:30:10 -0600
committercrobibero <cody@robibe.ro>2020-06-16 18:30:10 -0600
commita639663aa78405644a02fbdd25411874b6cb2ab4 (patch)
treef5601fd9f3c9f07f5991fdf4ee1ff2c8d795ac34 /Emby.Server.Implementations/Data/SqliteUserDataRepository.cs
parent7b54a43cc11964bffd9eaf8bad79a28b5845cc9c (diff)
parent215ab39e00be3a79875351a76f0d836a9281ce6b (diff)
Merge remote-tracking branch 'upstream/master' into warning-local-metadata
Diffstat (limited to 'Emby.Server.Implementations/Data/SqliteUserDataRepository.cs')
-rw-r--r--Emby.Server.Implementations/Data/SqliteUserDataRepository.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs b/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs
index 6ee6230fc..4a78aac8e 100644
--- a/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs
+++ b/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs
@@ -4,6 +4,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
+using Jellyfin.Data.Entities;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
@@ -134,10 +135,12 @@ namespace Emby.Server.Implementations.Data
{
throw new ArgumentNullException(nameof(userData));
}
+
if (internalUserId <= 0)
{
throw new ArgumentNullException(nameof(internalUserId));
}
+
if (string.IsNullOrEmpty(key))
{
throw new ArgumentNullException(nameof(key));
@@ -152,6 +155,7 @@ namespace Emby.Server.Implementations.Data
{
throw new ArgumentNullException(nameof(userData));
}
+
if (internalUserId <= 0)
{
throw new ArgumentNullException(nameof(internalUserId));
@@ -234,7 +238,7 @@ namespace Emby.Server.Implementations.Data
}
/// <summary>
- /// Persist all user data for the specified user
+ /// Persist all user data for the specified user.
/// </summary>
private void PersistAllUserData(long internalUserId, UserItemData[] userDataList, CancellationToken cancellationToken)
{
@@ -308,7 +312,7 @@ namespace Emby.Server.Implementations.Data
}
/// <summary>
- /// Return all user-data associated with the given user
+ /// Return all user-data associated with the given user.
/// </summary>
/// <param name="internalUserId"></param>
/// <returns></returns>
@@ -338,7 +342,7 @@ namespace Emby.Server.Implementations.Data
}
/// <summary>
- /// Read a row from the specified reader into the provided userData object
+ /// Read a row from the specified reader into the provided userData object.
/// </summary>
/// <param name="reader"></param>
private UserItemData ReadRow(IReadOnlyList<IResultSetValue> reader)
@@ -346,7 +350,7 @@ namespace Emby.Server.Implementations.Data
var userData = new UserItemData();
userData.Key = reader[0].ToString();
- //userData.UserId = reader[1].ReadGuidFromBlob();
+ // userData.UserId = reader[1].ReadGuidFromBlob();
if (reader[2].SQLiteType != SQLiteType.Null)
{