diff --git a/src/Sonarr.Api.V3/Episodes/EpisodeController.cs b/src/Sonarr.Api.V3/Episodes/EpisodeController.cs index 7b53a1f54..326bc36a9 100644 --- a/src/Sonarr.Api.V3/Episodes/EpisodeController.cs +++ b/src/Sonarr.Api.V3/Episodes/EpisodeController.cs @@ -25,24 +25,24 @@ namespace Sonarr.Api.V3.Episodes [HttpGet] [Produces("application/json")] - public List GetEpisodes(int? seriesId, int? seasonNumber, [FromQuery]List episodeIds, int? episodeFileId, bool includeImages = false) + public List GetEpisodes(int? seriesId, int? seasonNumber, [FromQuery]List episodeIds, int? episodeFileId, bool includeSeries = false, bool includeEpisodeFile = false, bool includeImages = false) { if (seriesId.HasValue) { if (seasonNumber.HasValue) { - return MapToResource(_episodeService.GetEpisodesBySeason(seriesId.Value, seasonNumber.Value), false, false, includeImages); + return MapToResource(_episodeService.GetEpisodesBySeason(seriesId.Value, seasonNumber.Value), includeSeries, includeEpisodeFile, includeImages); } - return MapToResource(_episodeService.GetEpisodeBySeries(seriesId.Value), false, false, includeImages); + return MapToResource(_episodeService.GetEpisodeBySeries(seriesId.Value), includeSeries, includeEpisodeFile, includeImages); } else if (episodeIds.Any()) { - return MapToResource(_episodeService.GetEpisodes(episodeIds), false, false, includeImages); + return MapToResource(_episodeService.GetEpisodes(episodeIds), includeSeries, includeEpisodeFile, includeImages); } else if (episodeFileId.HasValue) { - return MapToResource(_episodeService.GetEpisodesByFileId(episodeFileId.Value), false, false, includeImages); + return MapToResource(_episodeService.GetEpisodesByFileId(episodeFileId.Value), includeSeries, includeEpisodeFile, includeImages); } throw new BadRequestException("seriesId or episodeIds must be provided");