mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-02-06 11:50:56 +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)
|
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)
|
if (eventType.HasValue)
|
||||||
{
|
{
|
||||||
@ -70,9 +72,11 @@ namespace NzbDrone.Core.History
|
|||||||
|
|
||||||
public List<EpisodeHistory> GetBySeason(int seriesId, int seasonNumber, EpisodeHistoryEventType? eventType)
|
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)
|
SortBuilder<EpisodeHistory> query = Query
|
||||||
.Where(h => h.SeriesId == seriesId)
|
.Join<EpisodeHistory, Episode>(JoinType.Inner, h => h.Episode, (h, e) => h.EpisodeId == e.Id)
|
||||||
.AndWhere(h => h.Episode.SeasonNumber == seasonNumber);
|
.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)
|
if (eventType.HasValue)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user