mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 12:32:31 +01:00
27 lines
686 B
C#
27 lines
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();
|
|
}
|
|
}
|
|
} |