mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
episodes for series are now fetched using a single call and broken into seasons.
This commit is contained in:
parent
f7c78da4ed
commit
0c63e5ad81
12 changed files with 120 additions and 48 deletions
|
@ -19,19 +19,13 @@ namespace NzbDrone.Api.Episodes
|
|||
private List<EpisodeResource> GetEpisodes()
|
||||
{
|
||||
var seriesId = (int?)Request.Query.SeriesId;
|
||||
var seasonNumber = (int?)Request.Query.SeasonNumber;
|
||||
|
||||
if (seriesId == null)
|
||||
{
|
||||
throw new BadRequestException("seriesId is missing");
|
||||
}
|
||||
|
||||
if (seasonNumber == null)
|
||||
{
|
||||
return ToListResource(() => _episodeService.GetEpisodeBySeries(seriesId.Value));
|
||||
}
|
||||
|
||||
return ToListResource(() => _episodeService.GetEpisodesBySeason(seriesId.Value, seasonNumber.Value));
|
||||
return ToListResource(() => _episodeService.GetEpisodeBySeries(seriesId.Value));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue