diff options
| author | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
|---|---|---|
| committer | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
| commit | 48facb797ed912e4ea6b04b17d1ff190ac2daac4 (patch) | |
| tree | 8dae77a31670a888d733484cb17dd4077d5444e8 /MediaBrowser.Controller/Entities/UserItemData.cs | |
| parent | c32d8656382a0eacb301692e0084377fc433ae9b (diff) | |
Update to 3.5.2 and .net core 2.1
Diffstat (limited to 'MediaBrowser.Controller/Entities/UserItemData.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/UserItemData.cs | 124 |
1 files changed, 0 insertions, 124 deletions
diff --git a/MediaBrowser.Controller/Entities/UserItemData.cs b/MediaBrowser.Controller/Entities/UserItemData.cs deleted file mode 100644 index 0e1326949..000000000 --- a/MediaBrowser.Controller/Entities/UserItemData.cs +++ /dev/null @@ -1,124 +0,0 @@ -using System; -using MediaBrowser.Model.Serialization; - -namespace MediaBrowser.Controller.Entities -{ - /// <summary> - /// Class UserItemData - /// </summary> - public class UserItemData - { - /// <summary> - /// Gets or sets the user id. - /// </summary> - /// <value>The user id.</value> - public Guid UserId { get; set; } - - /// <summary> - /// Gets or sets the key. - /// </summary> - /// <value>The key.</value> - public string Key { get; set; } - - /// <summary> - /// The _rating - /// </summary> - private double? _rating; - /// <summary> - /// Gets or sets the users 0-10 rating - /// </summary> - /// <value>The rating.</value> - /// <exception cref="System.ArgumentOutOfRangeException">Rating;A 0 to 10 rating is required for UserItemData.</exception> - public double? Rating - { - get - { - return _rating; - } - set - { - if (value.HasValue) - { - if (value.Value < 0 || value.Value > 10) - { - throw new ArgumentOutOfRangeException("value", "A 0 to 10 rating is required for UserItemData."); - } - } - - _rating = value; - } - } - - /// <summary> - /// Gets or sets the playback position ticks. - /// </summary> - /// <value>The playback position ticks.</value> - public long PlaybackPositionTicks { get; set; } - - /// <summary> - /// Gets or sets the play count. - /// </summary> - /// <value>The play count.</value> - public int PlayCount { get; set; } - - /// <summary> - /// Gets or sets a value indicating whether this instance is favorite. - /// </summary> - /// <value><c>true</c> if this instance is favorite; otherwise, <c>false</c>.</value> - public bool IsFavorite { get; set; } - - /// <summary> - /// Gets or sets the last played date. - /// </summary> - /// <value>The last played date.</value> - public DateTime? LastPlayedDate { get; set; } - - /// <summary> - /// Gets or sets a value indicating whether this <see cref="UserItemData" /> is played. - /// </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 - /// 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] - public bool? Likes - { - get - { - if (Rating != null) - { - return Rating >= MinLikeValue; - } - - return null; - } - set - { - if (value.HasValue) - { - Rating = value.Value ? 10 : 1; - } - else - { - Rating = null; - } - } - } - } -} |
