You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Radarr/src/NzbDrone.Core/ImportLists/RadarrList2/RadarrList2RequestGenerator.cs

30 lines
954 B

using System.Collections.Generic;
using NLog;
using NzbDrone.Common.Http;
namespace NzbDrone.Core.ImportLists.RadarrList2
{
public abstract class RadarrList2RequestGeneratorBase : IImportListRequestGenerator
{
public IHttpRequestBuilderFactory RequestBuilder { get; set; }
public IHttpClient HttpClient { get; set; }
public Logger Logger { get; set; }
protected abstract HttpRequest GetHttpRequest();
public virtual ImportListPageableRequestChain GetMovies()
{
var pageableRequests = new ImportListPageableRequestChain();
var httpRequest = GetHttpRequest();
var request = new ImportListRequest(httpRequest.Url.ToString(), new HttpAccept(httpRequest.Headers.Accept));
request.HttpRequest.SuppressHttpError = true;
pageableRequests.Add(new List<ImportListRequest> { request });
return pageableRequests;
}
}
}