1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-30 19:45:57 +00:00
Lidarr/NzbDrone.Api/Series/SeriesLookupModule.cs

25 lines
655 B
C#
Raw Normal View History

2013-03-31 20:25:39 +00:00
using Nancy;
2013-02-23 20:35:26 +00:00
using NzbDrone.Api.Extensions;
using NzbDrone.Core.MetadataSource;
2013-01-28 18:06:54 +00:00
namespace NzbDrone.Api.Series
{
public class SeriesLookupModule : NzbDroneApiModule
{
2013-03-31 20:25:39 +00:00
private readonly ISearchForNewSeries _searchProxy;
2013-01-28 18:06:54 +00:00
2013-03-31 20:25:39 +00:00
public SeriesLookupModule(ISearchForNewSeries searchProxy)
2013-01-28 18:06:54 +00:00
: base("/Series/lookup")
{
2013-03-31 20:25:39 +00:00
_searchProxy = searchProxy;
2013-01-28 18:06:54 +00:00
Get["/"] = x => GetQualityType();
}
private Response GetQualityType()
{
2013-03-31 20:25:39 +00:00
var tvDbResults = _searchProxy.SearchForNewSeries((string)Request.Query.term);
2013-01-28 18:06:54 +00:00
return tvDbResults.AsResponse();
}
}
}