1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-09-19 07:52:33 +02:00
Radarr/NzbDrone.Api/Series/SeriesLookupModule.cs
2013-03-31 13:25:39 -07:00

25 lines
655 B
C#

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();
}
}
}