Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Sonarr/blame/commit/943a05bc0901e7dc2b4295815c92a3d1496f0e94/NzbDrone.Api/Seasons/SeasonModule.cs
You should set ROOT_URL correctly, otherwise the web may not work correctly.
|
|
|
|
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));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|