aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2019-10-20 15:16:01 -0400
committerJoshua Boniface <joshua@boniface.me>2019-10-20 15:17:39 -0400
commit6e59671cf6e8214406c74bae8aec80a49c6e72b3 (patch)
tree4495f913820480efd7150246ddd6cb4326bb74c3 /MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
parent86a50367b2a72f97450dc6fba4af4c0ec9984a55 (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/LiveTvProgram.cs')
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvProgram.cs38
1 files changed, 19 insertions, 19 deletions
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
index bdaf10d00..13df85aed 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
+using System.Text.Json.Serialization;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Providers;
@@ -9,7 +10,6 @@ using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.LiveTv;
using MediaBrowser.Model.Providers;
-using MediaBrowser.Model.Serialization;
namespace MediaBrowser.Controller.LiveTv
{
@@ -63,79 +63,79 @@ namespace MediaBrowser.Controller.LiveTv
}
}
- [IgnoreDataMember]
+ [JsonIgnore]
public override SourceType SourceType => SourceType.LiveTV;
/// <summary>
/// The start date of the program, in UTC.
/// </summary>
- [IgnoreDataMember]
+ [JsonIgnore]
public DateTime StartDate { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is repeat.
/// </summary>
/// <value><c>true</c> if this instance is repeat; otherwise, <c>false</c>.</value>
- [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; }
- [IgnoreDataMember]
+ [JsonIgnore]
public string ShowId { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is movie.
/// </summary>
/// <value><c>true</c> if this instance is movie; otherwise, <c>false</c>.</value>
- [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 => Tags.Contains("Sports", StringComparer.OrdinalIgnoreCase);
/// <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 live.
/// </summary>
/// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>
- [IgnoreDataMember]
+ [JsonIgnore]
public bool IsLive => Tags.Contains("Live", StringComparer.OrdinalIgnoreCase);
/// <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 => Tags.Contains("News", StringComparer.OrdinalIgnoreCase);
/// <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);
/// <summary>
/// Gets or sets a value indicating whether this instance is premiere.
/// </summary>
/// <value><c>true</c> if this instance is premiere; otherwise, <c>false</c>.</value>
- [IgnoreDataMember]
+ [JsonIgnore]
public bool IsPremiere => Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase);
/// <summary>
@@ -143,10 +143,10 @@ namespace MediaBrowser.Controller.LiveTv
/// If the item is a folder, it returns the folder itself
/// </summary>
/// <value>The containing folder path.</value>
- [IgnoreDataMember]
+ [JsonIgnore]
public override string ContainingFolderPath => Path;
- //[IgnoreDataMember]
+ //[JsonIgnore]
//public override string MediaType
//{
// get
@@ -155,7 +155,7 @@ namespace MediaBrowser.Controller.LiveTv
// }
//}
- [IgnoreDataMember]
+ [JsonIgnore]
public bool IsAiring
{
get
@@ -166,7 +166,7 @@ namespace MediaBrowser.Controller.LiveTv
}
}
- [IgnoreDataMember]
+ [JsonIgnore]
public bool HasAired
{
get
@@ -197,7 +197,7 @@ namespace MediaBrowser.Controller.LiveTv
return false;
}
- [IgnoreDataMember]
+ [JsonIgnore]
public override bool SupportsPeople
{
get
@@ -212,7 +212,7 @@ namespace MediaBrowser.Controller.LiveTv
}
}
- [IgnoreDataMember]
+ [JsonIgnore]
public override bool SupportsAncestors => false;
private LiveTvOptions GetConfiguration()