added series level settings to control display of specials

This commit is contained in:
Luke Pulverenti 2013-12-10 16:26:30 -05:00
parent 90184470fa
commit 50ea8cd941
5 changed files with 17 additions and 3 deletions

View File

@ -385,6 +385,11 @@ namespace MediaBrowser.Api
series.Status = request.Status; series.Status = request.Status;
series.AirDays = request.AirDays; series.AirDays = request.AirDays;
series.AirTime = request.AirTime; series.AirTime = request.AirTime;
if (request.DisplaySpecialsWithSeasons.HasValue)
{
series.DisplaySpecialsWithSeasons = request.DisplaySpecialsWithSeasons.Value;
}
} }
} }

View File

@ -29,8 +29,11 @@ namespace MediaBrowser.Controller.Entities.TV
RemoteTrailers = new List<MediaUrl>(); RemoteTrailers = new List<MediaUrl>();
LocalTrailerIds = new List<Guid>(); LocalTrailerIds = new List<Guid>();
Tags = new List<string>(); Tags = new List<string>();
DisplaySpecialsWithSeasons = true;
} }
public bool DisplaySpecialsWithSeasons { get; set; }
public List<Guid> LocalTrailerIds { get; set; } public List<Guid> LocalTrailerIds { get; set; }
public List<MediaUrl> RemoteTrailers { get; set; } public List<MediaUrl> RemoteTrailers { get; set; }
@ -157,7 +160,7 @@ namespace MediaBrowser.Controller.Entities.TV
var episodes = GetRecursiveChildren(user) var episodes = GetRecursiveChildren(user)
.OfType<Episode>(); .OfType<Episode>();
episodes = FilterEpisodesBySeason(episodes, seasonNumber, true); episodes = FilterEpisodesBySeason(episodes, seasonNumber, DisplaySpecialsWithSeasons);
var config = user.Configuration; var config = user.Configuration;

View File

@ -34,6 +34,7 @@ namespace MediaBrowser.Model.Dto
public int? AirsAfterSeasonNumber { get; set; } public int? AirsAfterSeasonNumber { get; set; }
public int? AirsBeforeEpisodeNumber { get; set; } public int? AirsBeforeEpisodeNumber { get; set; }
public int? AbsoluteEpisodeNumber { get; set; } public int? AbsoluteEpisodeNumber { get; set; }
public bool? DisplaySpecialsWithSeasons { get; set; }
/// <summary> /// <summary>
/// Gets or sets the DVD season number. /// Gets or sets the DVD season number.

View File

@ -59,7 +59,7 @@ namespace MediaBrowser.Model.Querying
/// <summary> /// <summary>
/// The metadata settings /// The metadata settings
/// </summary> /// </summary>
MetadataSettings, Settings,
/// <summary> /// <summary>
/// The original run time ticks /// The original run time ticks

View File

@ -728,7 +728,7 @@ namespace MediaBrowser.Server.Implementations.Dto
dto.DisplayMediaType = item.DisplayMediaType; dto.DisplayMediaType = item.DisplayMediaType;
if (fields.Contains(ItemFields.MetadataSettings)) if (fields.Contains(ItemFields.Settings))
{ {
dto.LockedFields = item.LockedFields; dto.LockedFields = item.LockedFields;
dto.EnableInternetProviders = !item.DontFetchMeta; dto.EnableInternetProviders = !item.DontFetchMeta;
@ -1093,6 +1093,11 @@ namespace MediaBrowser.Server.Implementations.Dto
dto.SpecialFeatureCount = series.SpecialFeatureIds.Count; dto.SpecialFeatureCount = series.SpecialFeatureIds.Count;
dto.SeasonCount = series.SeasonCount; dto.SeasonCount = series.SeasonCount;
if (fields.Contains(ItemFields.Settings))
{
dto.DisplaySpecialsWithSeasons = series.DisplaySpecialsWithSeasons;
}
} }
if (episode != null) if (episode != null)