aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Data
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-12-04 16:00:11 -0700
committercrobibero <cody@robibe.ro>2020-12-04 16:00:11 -0700
commit3db6ae91f6aa68a1eaf3da3d385b069bdd7721ee (patch)
tree7e4092397fdfb1f5c6e33ca5ea464cddb7c90996 /Jellyfin.Data
parent8d8738835ecc36c6f00157d4131d8200d5dd582a (diff)
Add ItemId to all display preferences
Diffstat (limited to 'Jellyfin.Data')
-rw-r--r--Jellyfin.Data/Entities/CustomItemDisplayPreferences.cs12
-rw-r--r--Jellyfin.Data/Entities/DisplayPreferences.cs12
-rw-r--r--Jellyfin.Data/Jellyfin.Data.csproj2
3 files changed, 23 insertions, 3 deletions
diff --git a/Jellyfin.Data/Entities/CustomItemDisplayPreferences.cs b/Jellyfin.Data/Entities/CustomItemDisplayPreferences.cs
index 452d933eba..511e3b281a 100644
--- a/Jellyfin.Data/Entities/CustomItemDisplayPreferences.cs
+++ b/Jellyfin.Data/Entities/CustomItemDisplayPreferences.cs
@@ -13,12 +13,14 @@ namespace Jellyfin.Data.Entities
/// Initializes a new instance of the <see cref="CustomItemDisplayPreferences"/> class.
/// </summary>
/// <param name="userId">The user id.</param>
+ /// <param name="itemId">The item id.</param>
/// <param name="client">The client.</param>
/// <param name="preferenceKey">The preference key.</param>
/// <param name="preferenceValue">The preference value.</param>
- public CustomItemDisplayPreferences(Guid userId, string client, string preferenceKey, string preferenceValue)
+ public CustomItemDisplayPreferences(Guid userId, Guid itemId, string client, string preferenceKey, string preferenceValue)
{
UserId = userId;
+ ItemId = itemId;
Client = client;
Key = preferenceKey;
Value = preferenceValue;
@@ -49,6 +51,14 @@ namespace Jellyfin.Data.Entities
public Guid UserId { get; set; }
/// <summary>
+ /// Gets or sets the id of the associated item.
+ /// </summary>
+ /// <remarks>
+ /// Required.
+ /// </remarks>
+ public Guid ItemId { get; set; }
+
+ /// <summary>
/// Gets or sets the client string.
/// </summary>
/// <remarks>
diff --git a/Jellyfin.Data/Entities/DisplayPreferences.cs b/Jellyfin.Data/Entities/DisplayPreferences.cs
index 701e4df004..1a8ca1da37 100644
--- a/Jellyfin.Data/Entities/DisplayPreferences.cs
+++ b/Jellyfin.Data/Entities/DisplayPreferences.cs
@@ -17,10 +17,12 @@ namespace Jellyfin.Data.Entities
/// Initializes a new instance of the <see cref="DisplayPreferences"/> class.
/// </summary>
/// <param name="userId">The user's id.</param>
+ /// <param name="itemId">The item id.</param>
/// <param name="client">The client string.</param>
- public DisplayPreferences(Guid userId, string client)
+ public DisplayPreferences(Guid userId, Guid itemId, string client)
{
UserId = userId;
+ ItemId = itemId;
Client = client;
ShowSidebar = false;
ShowBackdrop = true;
@@ -59,6 +61,14 @@ namespace Jellyfin.Data.Entities
public Guid UserId { get; set; }
/// <summary>
+ /// Gets or sets the id of the associated item.
+ /// </summary>
+ /// <remarks>
+ /// Required.
+ /// </remarks>
+ public Guid ItemId { get; set; }
+
+ /// <summary>
/// Gets or sets the client string.
/// </summary>
/// <remarks>
diff --git a/Jellyfin.Data/Jellyfin.Data.csproj b/Jellyfin.Data/Jellyfin.Data.csproj
index 9ae129d072..89d6f4d9b7 100644
--- a/Jellyfin.Data/Jellyfin.Data.csproj
+++ b/Jellyfin.Data/Jellyfin.Data.csproj
@@ -29,7 +29,7 @@
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
+ <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>
<!-- Code analysers-->