diff options
| author | WWWesten <4700006+WWWesten@users.noreply.github.com> | 2021-11-01 23:43:29 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-01 23:43:29 +0500 |
| commit | 0a14279e2a21bcb9654a06a2d49e1e4f0cc5329c (patch) | |
| tree | e1b1bd603b011ca98e5793e356326bf4a35a7050 /MediaBrowser.Controller/Entities/UserItemData.cs | |
| parent | f2817fef743eeb75a00782ceea363b2d3e7dc9f2 (diff) | |
| parent | 76eeb8f655424d295e73ced8349c6fefee6ddb12 (diff) | |
Merge branch 'jellyfin:master' into master
Diffstat (limited to 'MediaBrowser.Controller/Entities/UserItemData.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/UserItemData.cs | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/MediaBrowser.Controller/Entities/UserItemData.cs b/MediaBrowser.Controller/Entities/UserItemData.cs index f7136bdf2..50ba9ef30 100644 --- a/MediaBrowser.Controller/Entities/UserItemData.cs +++ b/MediaBrowser.Controller/Entities/UserItemData.cs @@ -1,13 +1,24 @@ +#nullable disable + +#pragma warning disable CS1591 + using System; -using MediaBrowser.Model.Serialization; +using System.Text.Json.Serialization; namespace MediaBrowser.Controller.Entities { /// <summary> - /// Class UserItemData + /// Class UserItemData. /// </summary> public class UserItemData { + public const double MinLikeValue = 6.5; + + /// <summary> + /// The _rating. + /// </summary> + private double? _rating; + /// <summary> /// Gets or sets the user id. /// </summary> @@ -21,11 +32,7 @@ namespace MediaBrowser.Controller.Entities public string Key { get; set; } /// <summary> - /// The _rating - /// </summary> - private double? _rating; - /// <summary> - /// Gets or sets the users 0-10 rating + /// Gets or sets the users 0-10 rating. /// </summary> /// <value>The rating.</value> /// <exception cref="ArgumentOutOfRangeException">Rating;A 0 to 10 rating is required for UserItemData.</exception> @@ -75,25 +82,25 @@ namespace MediaBrowser.Controller.Entities /// </summary> /// <value><c>true</c> if played; otherwise, <c>false</c>.</value> public bool Played { get; set; } + /// <summary> /// Gets or sets the index of the audio stream. /// </summary> /// <value>The index of the audio stream.</value> public int? AudioStreamIndex { get; set; } + /// <summary> /// Gets or sets the index of the subtitle stream. /// </summary> /// <value>The index of the subtitle stream.</value> public int? SubtitleStreamIndex { get; set; } - public const double MinLikeValue = 6.5; - /// <summary> - /// This is an interpreted property to indicate likes or dislikes + /// Gets or sets a value indicating whether the item is liked or not. /// This should never be serialized. /// </summary> /// <value><c>null</c> if [likes] contains no value, <c>true</c> if [likes]; otherwise, <c>false</c>.</value> - [IgnoreDataMember] + [JsonIgnore] public bool? Likes { get @@ -105,6 +112,7 @@ namespace MediaBrowser.Controller.Entities return null; } + set { if (value.HasValue) |
