mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
episode detail is working but its a bit slow.
This commit is contained in:
parent
4a4e440ec0
commit
9a738e3a65
16 changed files with 72 additions and 64 deletions
|
@ -1,6 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using AutoMapper;
|
||||
using Nancy;
|
||||
|
@ -17,12 +15,15 @@ namespace NzbDrone.Api.Episodes
|
|||
: base("/episodes")
|
||||
{
|
||||
_episodeService = episodeService;
|
||||
Get["/{seriesId}"] = x => GetEpisodesForSeries(x.SeriesId);
|
||||
Get["/"] = x => GetEpisodesForSeries();
|
||||
}
|
||||
|
||||
private Response GetEpisodesForSeries(int seriesId)
|
||||
private Response GetEpisodesForSeries()
|
||||
{
|
||||
var episodes = _episodeService.GetEpisodeBySeries(seriesId);
|
||||
var seriesId = (int)Request.Query.SeriesId;
|
||||
var seasonNumber = (int)Request.Query.SeasonNumber;
|
||||
|
||||
var episodes = _episodeService.GetEpisodesBySeason(seriesId, seasonNumber);
|
||||
return Mapper.Map<List<Episode>, List<EpisodeResource>>(episodes).AsResponse();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue