update components

This commit is contained in:
Luke Pulverenti 2015-08-04 10:26:36 -04:00
parent 036301795e
commit 30710dbe00
7 changed files with 34 additions and 14 deletions

View File

@ -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
};

View File

@ -646,6 +646,7 @@ namespace MediaBrowser.Model.Dto
/// Gets or sets a value indicating whether [supports playlists].
/// </summary>
/// <value><c>true</c> if [supports playlists]; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool SupportsPlaylists
{
get

View File

@ -63,6 +63,11 @@ namespace MediaBrowser.Model.LiveTv
/// <remarks>If set to null, all programs will be returned</remarks>
public bool? IsMovie { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is kids.
/// </summary>
/// <value><c>null</c> if [is kids] contains no value, <c>true</c> if [is kids]; otherwise, <c>false</c>.</value>
public bool? IsKids { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is sports.
/// </summary>

View File

@ -44,6 +44,11 @@ namespace MediaBrowser.Model.LiveTv
/// <value><c>null</c> if [is movie] contains no value, <c>true</c> if [is movie]; otherwise, <c>false</c>.</value>
public bool? IsMovie { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is kids.
/// </summary>
/// <value><c>null</c> if [is kids] contains no value, <c>true</c> if [is kids]; otherwise, <c>false</c>.</value>
public bool? IsKids { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is sports.
/// </summary>
/// <value><c>null</c> if [is sports] contains no value, <c>true</c> if [is sports]; otherwise, <c>false</c>.</value>

View File

@ -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,

View File

@ -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<string>() { "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);
}

View File

@ -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)