|
|
|
@ -1412,6 +1412,7 @@ namespace MediaBrowser.Server.Implementations.Dto
|
|
|
|
|
if (episode != null)
|
|
|
|
|
{
|
|
|
|
|
dto.IndexNumberEnd = episode.IndexNumberEnd;
|
|
|
|
|
dto.SeriesName = episode.SeriesName;
|
|
|
|
|
|
|
|
|
|
if (fields.Contains(ItemFields.AlternateEpisodeNumbers))
|
|
|
|
|
{
|
|
|
|
@ -1427,74 +1428,70 @@ namespace MediaBrowser.Server.Implementations.Dto
|
|
|
|
|
dto.AirsBeforeSeasonNumber = episode.AirsBeforeSeasonNumber;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var seasonId = episode.SeasonId;
|
|
|
|
|
if (seasonId.HasValue)
|
|
|
|
|
{
|
|
|
|
|
dto.SeasonId = seasonId.Value.ToString("N");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var episodeSeason = episode.Season;
|
|
|
|
|
if (episodeSeason != null)
|
|
|
|
|
{
|
|
|
|
|
dto.SeasonId = episodeSeason.Id.ToString("N");
|
|
|
|
|
|
|
|
|
|
if (fields.Contains(ItemFields.SeasonName))
|
|
|
|
|
{
|
|
|
|
|
dto.SeasonName = episodeSeason.Name;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (fields.Contains(ItemFields.SeriesGenres))
|
|
|
|
|
var episodeSeries = episode.Series;
|
|
|
|
|
|
|
|
|
|
if (episodeSeries != null)
|
|
|
|
|
{
|
|
|
|
|
var episodeseries = episode.Series;
|
|
|
|
|
if (episodeseries != null)
|
|
|
|
|
if (fields.Contains(ItemFields.SeriesGenres))
|
|
|
|
|
{
|
|
|
|
|
dto.SeriesGenres = episodeseries.Genres.ToList();
|
|
|
|
|
dto.SeriesGenres = episodeSeries.Genres.ToList();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Add SeriesInfo
|
|
|
|
|
var series = item as Series;
|
|
|
|
|
if (series != null)
|
|
|
|
|
{
|
|
|
|
|
dto.AirDays = series.AirDays;
|
|
|
|
|
dto.AirTime = series.AirTime;
|
|
|
|
|
dto.SeriesStatus = series.Status;
|
|
|
|
|
|
|
|
|
|
if (fields.Contains(ItemFields.Settings))
|
|
|
|
|
{
|
|
|
|
|
dto.DisplaySpecialsWithSeasons = series.DisplaySpecialsWithSeasons;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dto.AnimeSeriesIndex = series.AnimeSeriesIndex;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (episode != null)
|
|
|
|
|
{
|
|
|
|
|
series = episode.Series;
|
|
|
|
|
|
|
|
|
|
if (series != null)
|
|
|
|
|
{
|
|
|
|
|
dto.SeriesId = GetDtoId(series);
|
|
|
|
|
dto.SeriesName = series.Name;
|
|
|
|
|
dto.SeriesId = GetDtoId(episodeSeries);
|
|
|
|
|
|
|
|
|
|
if (fields.Contains(ItemFields.AirTime))
|
|
|
|
|
{
|
|
|
|
|
dto.AirTime = series.AirTime;
|
|
|
|
|
dto.AirTime = episodeSeries.AirTime;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (options.GetImageLimit(ImageType.Thumb) > 0)
|
|
|
|
|
{
|
|
|
|
|
dto.SeriesThumbImageTag = GetImageCacheTag(series, ImageType.Thumb);
|
|
|
|
|
dto.SeriesThumbImageTag = GetImageCacheTag(episodeSeries, ImageType.Thumb);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (options.GetImageLimit(ImageType.Primary) > 0)
|
|
|
|
|
{
|
|
|
|
|
dto.SeriesPrimaryImageTag = GetImageCacheTag(series, ImageType.Primary);
|
|
|
|
|
dto.SeriesPrimaryImageTag = GetImageCacheTag(episodeSeries, ImageType.Primary);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (fields.Contains(ItemFields.SeriesStudio))
|
|
|
|
|
{
|
|
|
|
|
dto.SeriesStudio = series.Studios.FirstOrDefault();
|
|
|
|
|
dto.SeriesStudio = episodeSeries.Studios.FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Add SeriesInfo
|
|
|
|
|
var series = item as Series;
|
|
|
|
|
if (series != null)
|
|
|
|
|
{
|
|
|
|
|
dto.AirDays = series.AirDays;
|
|
|
|
|
dto.AirTime = series.AirTime;
|
|
|
|
|
dto.SeriesStatus = series.Status;
|
|
|
|
|
|
|
|
|
|
if (fields.Contains(ItemFields.Settings))
|
|
|
|
|
{
|
|
|
|
|
dto.DisplaySpecialsWithSeasons = series.DisplaySpecialsWithSeasons;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dto.AnimeSeriesIndex = series.AnimeSeriesIndex;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Add SeasonInfo
|
|
|
|
|
var season = item as Season;
|
|
|
|
|
if (season != null)
|
|
|
|
|