mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
episode detail is working but its a bit slow.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user