mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
season list is properly populated in series details.
This commit is contained in:
parent
6447b78a5a
commit
62f15d4d96
18 changed files with 127 additions and 23 deletions
29
NzbDrone.Api/Seasons/SeasonModule.cs
Normal file
29
NzbDrone.Api/Seasons/SeasonModule.cs
Normal file
|
@ -0,0 +1,29 @@
|
|||
using System.Linq;
|
||||
using Nancy;
|
||||
using NzbDrone.Api.Extensions;
|
||||
using NzbDrone.Core.Tv;
|
||||
|
||||
namespace NzbDrone.Api.Seasons
|
||||
{
|
||||
public class SeasonModule : NzbDroneApiModule
|
||||
{
|
||||
private readonly ISeasonService _seasonService;
|
||||
|
||||
public SeasonModule(ISeasonService seasonService)
|
||||
: base("/Season")
|
||||
{
|
||||
_seasonService = seasonService;
|
||||
|
||||
Get["/"] = x => GetSeasons();
|
||||
}
|
||||
|
||||
private Response GetSeasons()
|
||||
{
|
||||
var seriesId = Request.Query.SeriesId;
|
||||
|
||||
return JsonExtensions.AsResponse(_seasonService.GetSeasonsBySeries(seriesId));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue