mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
updated add series
This commit is contained in:
parent
f3e601d4ed
commit
0531029ce7
16 changed files with 243 additions and 29 deletions
27
NzbDrone.Api/Series/SeriesLookupModule.cs
Normal file
27
NzbDrone.Api/Series/SeriesLookupModule.cs
Normal file
|
@ -0,0 +1,27 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue