You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lidarr/NzbDrone.Api/Series/SeriesLookupModule.cs

25 lines
655 B

using Nancy;
using NzbDrone.Api.Extensions;
using NzbDrone.Core.MetadataSource;
namespace NzbDrone.Api.Series
{
public class SeriesLookupModule : NzbDroneApiModule
{
private readonly ISearchForNewSeries _searchProxy;
public SeriesLookupModule(ISearchForNewSeries searchProxy)
: base("/Series/lookup")
{
_searchProxy = searchProxy;
Get["/"] = x => GetQualityType();
}
private Response GetQualityType()
{
var tvDbResults = _searchProxy.SearchForNewSeries((string)Request.Query.term);
return tvDbResults.AsResponse();
}
}
}