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

28 lines
701 B

using System.Linq;
using Nancy;
12 years ago
using NzbDrone.Api.Extensions;
using NzbDrone.Api.QualityType;
using NzbDrone.Core.MetadataSource;
using NzbDrone.Core.Providers;
namespace NzbDrone.Api.Series
{
public class SeriesLookupModule : NzbDroneApiModule
{
private readonly TvDbProxy _tvDbProxy;
public SeriesLookupModule(TvDbProxy tvDbProxy)
: base("/Series/lookup")
{
_tvDbProxy = tvDbProxy;
Get["/"] = x => GetQualityType();
}
private Response GetQualityType()
{
var tvDbResults = _tvDbProxy.SearchSeries((string)Request.Query.term);
return tvDbResults.AsResponse();
}
}
}