mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-11-01 08:22:35 +01:00
28 lines
701 B
C#
28 lines
701 B
C#
using System.Linq;
|
|
using Nancy;
|
|
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();
|
|
}
|
|
}
|
|
} |