1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-28 02:27:13 +00:00
Lidarr/NzbDrone.Api/Series/SeriesLookupModule.cs
2013-02-15 16:52:34 -08:00

27 lines
No EOL
686 B
C#

using System.Linq;
using Nancy;
using NzbDrone.Api.Extentions;
using NzbDrone.Api.QualityType;
using NzbDrone.Core.Providers;
namespace NzbDrone.Api.Series
{
public class SeriesLookupModule : NzbDroneApiModule
{
private readonly TvDbProvider _tvDbProvider;
public SeriesLookupModule(TvDbProvider tvDbProvider)
: base("/Series/lookup")
{
_tvDbProvider = tvDbProvider;
Get["/"] = x => GetQualityType();
}
private Response GetQualityType()
{
var tvDbResults = _tvDbProvider.SearchSeries((string)Request.Query.term);
return tvDbResults.AsResponse();
}
}
}