mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-31 11:24:23 +02:00
Fixed: api/v3/history/series "includeSeries" and "includeEpisode" query parameters
Closes #4727
This commit is contained in:
parent
19510c4932
commit
b70ef368db
@ -58,7 +58,9 @@ namespace NzbDrone.Core.History
|
||||
|
||||
public List<EpisodeHistory> GetBySeries(int seriesId, EpisodeHistoryEventType? eventType)
|
||||
{
|
||||
var query = Query.Where(h => h.SeriesId == seriesId);
|
||||
var query = Query.Join<EpisodeHistory, Series>(JoinType.Inner, h => h.Series, (h, s) => h.SeriesId == s.Id)
|
||||
.Join<EpisodeHistory, Episode>(JoinType.Inner, h => h.Episode, (h, e) => h.EpisodeId == e.Id)
|
||||
.Where(h => h.SeriesId == seriesId);
|
||||
|
||||
if (eventType.HasValue)
|
||||
{
|
||||
@ -70,9 +72,11 @@ namespace NzbDrone.Core.History
|
||||
|
||||
public List<EpisodeHistory> GetBySeason(int seriesId, int seasonNumber, EpisodeHistoryEventType? eventType)
|
||||
{
|
||||
var query = Query.Join<EpisodeHistory, Episode>(JoinType.Inner, h => h.Episode, (h, e) => h.EpisodeId == e.Id)
|
||||
.Where(h => h.SeriesId == seriesId)
|
||||
.AndWhere(h => h.Episode.SeasonNumber == seasonNumber);
|
||||
SortBuilder<EpisodeHistory> query = Query
|
||||
.Join<EpisodeHistory, Episode>(JoinType.Inner, h => h.Episode, (h, e) => h.EpisodeId == e.Id)
|
||||
.Join<EpisodeHistory, Series>(JoinType.Inner, h => h.Series, (h, s) => h.SeriesId == s.Id)
|
||||
.Where(h => h.SeriesId == seriesId)
|
||||
.AndWhere(h => h.Episode.SeasonNumber == seasonNumber);
|
||||
|
||||
if (eventType.HasValue)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user