diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2019-10-20 15:16:01 -0400 |
|---|---|---|
| committer | Joshua Boniface <joshua@boniface.me> | 2019-10-20 15:17:39 -0400 |
| commit | 6e59671cf6e8214406c74bae8aec80a49c6e72b3 (patch) | |
| tree | 4495f913820480efd7150246ddd6cb4326bb74c3 /MediaBrowser.Controller/LiveTv/LiveTvChannel.cs | |
| parent | 86a50367b2a72f97450dc6fba4af4c0ec9984a55 (diff) | |
Merge pull request #1898 from Bond-009/jsonfix
Fix Json serialization error
(cherry picked from commit 91600b1c81872e1745401942633a87085dc706b5)
Signed-off-by: Joshua Boniface <joshua@boniface.me>
Diffstat (limited to 'MediaBrowser.Controller/LiveTv/LiveTvChannel.cs')
| -rw-r--r-- | MediaBrowser.Controller/LiveTv/LiveTvChannel.cs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs index 351662b294..60391bb83f 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs @@ -2,13 +2,13 @@ using System; using System.Collections.Generic; using System.Globalization; using System.Linq; +using System.Text.Json.Serialization; using MediaBrowser.Controller.Entities; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.MediaInfo; -using MediaBrowser.Model.Serialization; namespace MediaBrowser.Controller.LiveTv { @@ -31,13 +31,13 @@ namespace MediaBrowser.Controller.LiveTv return UnratedItem.LiveTvChannel; } - [IgnoreDataMember] + [JsonIgnore] public override bool SupportsPositionTicksResume => false; - [IgnoreDataMember] + [JsonIgnore] public override SourceType SourceType => SourceType.LiveTV; - [IgnoreDataMember] + [JsonIgnore] public override bool EnableRememberingTrackSelections => false; /// <summary> @@ -52,7 +52,7 @@ namespace MediaBrowser.Controller.LiveTv /// <value>The type of the channel.</value> public ChannelType ChannelType { get; set; } - [IgnoreDataMember] + [JsonIgnore] public override LocationType LocationType => LocationType.Remote; protected override string CreateSortName() @@ -70,7 +70,7 @@ namespace MediaBrowser.Controller.LiveTv return (Number ?? string.Empty) + "-" + (Name ?? string.Empty); } - [IgnoreDataMember] + [JsonIgnore] public override string MediaType => ChannelType == ChannelType.Radio ? Model.Entities.MediaType.Audio : Model.Entities.MediaType.Video; public override string GetClientTypeName() @@ -119,45 +119,45 @@ namespace MediaBrowser.Controller.LiveTv return false; } - [IgnoreDataMember] + [JsonIgnore] public bool IsMovie { get; set; } /// <summary> /// Gets or sets a value indicating whether this instance is sports. /// </summary> /// <value><c>true</c> if this instance is sports; otherwise, <c>false</c>.</value> - [IgnoreDataMember] + [JsonIgnore] public bool IsSports { get; set; } /// <summary> /// Gets or sets a value indicating whether this instance is series. /// </summary> /// <value><c>true</c> if this instance is series; otherwise, <c>false</c>.</value> - [IgnoreDataMember] + [JsonIgnore] public bool IsSeries { get; set; } /// <summary> /// Gets or sets a value indicating whether this instance is news. /// </summary> /// <value><c>true</c> if this instance is news; otherwise, <c>false</c>.</value> - [IgnoreDataMember] + [JsonIgnore] public bool IsNews { get; set; } /// <summary> /// Gets or sets a value indicating whether this instance is kids. /// </summary> /// <value><c>true</c> if this instance is kids; otherwise, <c>false</c>.</value> - [IgnoreDataMember] + [JsonIgnore] public bool IsKids => Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase); - [IgnoreDataMember] + [JsonIgnore] public bool IsRepeat { get; set; } /// <summary> /// Gets or sets the episode title. /// </summary> /// <value>The episode title.</value> - [IgnoreDataMember] + [JsonIgnore] public string EpisodeTitle { get; set; } } } |
