mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
can do series lookup using the api.
This commit is contained in:
parent
5fb1f4902f
commit
32e402b5a0
6 changed files with 49 additions and 11 deletions
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();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue