1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-14 11:23:42 +02:00
Sonarr/NzbDrone.Api/Series/SeriesModule.cs

26 lines
642 B
C#
Raw Normal View History

2013-01-20 04:37:48 +03:00
using System.Linq;
using Nancy;
using NzbDrone.Api.QualityType;
using NzbDrone.Core.Providers;
namespace NzbDrone.Api.Series
{
public class SeriesModule : NzbDroneApiModule
{
private readonly TvDbProvider _tvDbProvider;
public SeriesModule(TvDbProvider tvDbProvider)
: base("/Series")
{
_tvDbProvider = tvDbProvider;
Get["/lookup"] = x => GetQualityType();
}
private Response GetQualityType()
{
var tvDbResults = _tvDbProvider.SearchSeries((string)Request.Query.term);
return tvDbResults.AsResponse();
}
}
}