diff --git a/MediaBrowser.Api/LiveTv/LiveTvService.cs b/MediaBrowser.Api/LiveTv/LiveTvService.cs
index 3ff4c4828..bdec55561 100644
--- a/MediaBrowser.Api/LiveTv/LiveTvService.cs
+++ b/MediaBrowser.Api/LiveTv/LiveTvService.cs
@@ -222,6 +222,9 @@ namespace MediaBrowser.Api.LiveTv
[ApiMember(Name = "IsMovie", Description = "Optional filter for movies.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET,POST")]
public bool? IsMovie { get; set; }
+ [ApiMember(Name = "IsKids", Description = "Optional filter for kids.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET,POST")]
+ public bool? IsKids { get; set; }
+
[ApiMember(Name = "IsSports", Description = "Optional filter for sports.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET,POST")]
public bool? IsSports { get; set; }
@@ -279,6 +282,9 @@ namespace MediaBrowser.Api.LiveTv
[ApiMember(Name = "IsMovie", Description = "Optional filter for movies.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
public bool? IsMovie { get; set; }
+ [ApiMember(Name = "IsKids", Description = "Optional filter for kids.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
+ public bool? IsKids { get; set; }
+
[ApiMember(Name = "EnableImages", Description = "Optional, include image information in output", IsRequired = false, DataType = "boolean", ParameterType = "query", Verb = "GET")]
public bool? EnableImages { get; set; }
@@ -607,6 +613,7 @@ namespace MediaBrowser.Api.LiveTv
query.SortBy = (request.SortBy ?? String.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
query.SortOrder = request.SortOrder;
query.IsMovie = request.IsMovie;
+ query.IsKids = request.IsKids;
query.IsSports = request.IsSports;
query.Genres = (request.Genres ?? String.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
@@ -624,6 +631,7 @@ namespace MediaBrowser.Api.LiveTv
Limit = request.Limit,
HasAired = request.HasAired,
IsMovie = request.IsMovie,
+ IsKids = request.IsKids,
IsSports = request.IsSports
};
diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs
index 7c5d9e9a1..aa68e09a0 100644
--- a/MediaBrowser.Model/Dto/BaseItemDto.cs
+++ b/MediaBrowser.Model/Dto/BaseItemDto.cs
@@ -646,6 +646,7 @@ namespace MediaBrowser.Model.Dto
/// Gets or sets a value indicating whether [supports playlists].
///
/// true if [supports playlists]; otherwise, false.
+ [IgnoreDataMember]
public bool SupportsPlaylists
{
get
diff --git a/MediaBrowser.Model/LiveTv/ProgramQuery.cs b/MediaBrowser.Model/LiveTv/ProgramQuery.cs
index 3f652ea6f..7a877e356 100644
--- a/MediaBrowser.Model/LiveTv/ProgramQuery.cs
+++ b/MediaBrowser.Model/LiveTv/ProgramQuery.cs
@@ -63,6 +63,11 @@ namespace MediaBrowser.Model.LiveTv
/// If set to null, all programs will be returned
public bool? IsMovie { get; set; }
+ ///
+ /// Gets or sets a value indicating whether this instance is kids.
+ ///
+ /// null if [is kids] contains no value, true if [is kids]; otherwise, false.
+ public bool? IsKids { get; set; }
///
/// Gets or sets a value indicating whether this instance is sports.
///
diff --git a/MediaBrowser.Model/LiveTv/RecommendedProgramQuery.cs b/MediaBrowser.Model/LiveTv/RecommendedProgramQuery.cs
index 09d45066b..e83a8fda6 100644
--- a/MediaBrowser.Model/LiveTv/RecommendedProgramQuery.cs
+++ b/MediaBrowser.Model/LiveTv/RecommendedProgramQuery.cs
@@ -44,6 +44,11 @@ namespace MediaBrowser.Model.LiveTv
/// null if [is movie] contains no value, true if [is movie]; otherwise, false.
public bool? IsMovie { get; set; }
///
+ /// Gets or sets a value indicating whether this instance is kids.
+ ///
+ /// null if [is kids] contains no value, true if [is kids]; otherwise, false.
+ public bool? IsKids { get; set; }
+ ///
/// Gets or sets a value indicating whether this instance is sports.
///
/// null if [is sports] contains no value, true if [is sports]; otherwise, false.
diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
index 9ca2537f1..b96e3b26c 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
@@ -490,13 +490,13 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
if (recording == null)
{
- recording = new RecordingInfo()
+ recording = new RecordingInfo
{
ChannelId = info.ChannelId,
Id = Guid.NewGuid().ToString("N"),
StartDate = info.StartDate,
EndDate = info.EndDate,
- Genres = info.Genres ?? null,
+ Genres = info.Genres,
IsKids = info.IsKids,
IsLive = info.IsLive,
IsMovie = info.IsMovie,
@@ -507,10 +507,10 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
IsSports = info.IsSports,
IsRepeat = !info.IsPremiere,
Name = info.Name,
- EpisodeTitle = info.EpisodeTitle ?? "",
+ EpisodeTitle = info.EpisodeTitle,
ProgramId = info.Id,
- HasImage = info.HasImage ?? false,
- ImagePath = info.ImagePath ?? null,
+ HasImage = info.HasImage,
+ ImagePath = info.ImagePath,
ImageUrl = info.ImageUrl,
OriginalAirDate = info.OriginalAirDate,
Status = RecordingStatus.Scheduled,
diff --git a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
index 655feedae..2aadf4a66 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs
@@ -286,20 +286,20 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
}
}
ScheduleDirect.Gracenote gracenote;
- string EpisodeTitle = "";
+ string episodeTitle = null;
if (details.metadata != null)
{
gracenote = details.metadata.Find(x => x.Gracenote != null).Gracenote;
if ((details.showType ?? "No ShowType") == "Series")
{
- EpisodeTitle = "Season: " + gracenote.season + " Episode: " + gracenote.episode;
+ episodeTitle = "Season: " + gracenote.season + " Episode: " + gracenote.episode;
}
}
if (details.episodeTitle150 != null)
{
- EpisodeTitle = EpisodeTitle + " " + details.episodeTitle150;
+ episodeTitle = ((episodeTitle ?? string.Empty) + " " + details.episodeTitle150).Trim();
}
- bool hasImage = false;
+
var imageLink = "";
if (details.hasImageArtwork)
@@ -314,11 +314,10 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
Overview = desc,
StartDate = startAt,
EndDate = endAt,
- Genres = new List() { "N/A" },
Name = details.titles[0].title120 ?? "Unkown",
OfficialRating = "0",
CommunityRating = null,
- EpisodeTitle = EpisodeTitle,
+ EpisodeTitle = episodeTitle,
Audio = audioType,
IsHD = hdtv,
IsRepeat = repeat,
@@ -339,8 +338,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
(details.showType ?? "No ShowType") == "Short Film",
IsPremiere = false,
};
- //logger.Info("Done init");
- if (null != details.originalAirDate)
+
+ if (!string.IsNullOrWhiteSpace(details.originalAirDate))
{
info.OriginalAirDate = DateTime.Parse(details.originalAirDate);
}
diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
index b4669f53e..6861901ac 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
@@ -774,6 +774,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
ChannelIds = query.ChannelIds,
IsMovie = query.IsMovie,
IsSports = query.IsSports,
+ IsKids = query.IsKids,
Genres = query.Genres
};
@@ -844,7 +845,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv
IncludeItemTypes = new[] { typeof(LiveTvProgram).Name },
IsAiring = query.IsAiring,
IsMovie = query.IsMovie,
- IsSports = query.IsSports
+ IsSports = query.IsSports,
+ IsKids = query.IsKids
};
if (query.HasAired.HasValue)