mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-26 20:11:49 +02:00
can do series lookup using the api.
This commit is contained in:
26
NzbDrone.Api/Series/SeriesModule.cs
Normal file
26
NzbDrone.Api/Series/SeriesModule.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user