mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-26 22:46:37 -04:00
Build download requests from indexer implementation
(cherry picked from commit a0b08f6c6f106d92cdb12fbb959dd2605c22fe6a)
This commit is contained in:
@@ -35,7 +35,7 @@ namespace NzbDrone.Core.Download
|
||||
|
||||
protected abstract string AddFromNzbFile(RemoteBook remoteBook, string filename, byte[] fileContent);
|
||||
|
||||
public override string Download(RemoteBook remoteBook)
|
||||
public override string Download(RemoteBook remoteBook, IIndexer indexer)
|
||||
{
|
||||
var url = remoteBook.Release.DownloadUrl;
|
||||
var filename = FileNameBuilder.CleanFileName(remoteBook.Release.Title) + ".nzb";
|
||||
@@ -44,7 +44,7 @@ namespace NzbDrone.Core.Download
|
||||
|
||||
try
|
||||
{
|
||||
var request = new HttpRequest(url);
|
||||
var request = indexer.GetDownloadRequest(url);
|
||||
request.RateLimitKey = remoteBook?.Release?.IndexerId.ToString();
|
||||
|
||||
// TODO: Look into moving download request handling to indexer
|
||||
|
||||
Reference in New Issue
Block a user