Remove BasicAuthString

pull/2427/head
Bogdan 2 years ago
parent 7a7039b1f7
commit db7bb14491

@ -47,12 +47,6 @@ namespace NzbDrone.Core.Download
var request = indexer.GetDownloadRequest(url); var request = indexer.GetDownloadRequest(url);
request.RateLimitKey = remoteBook?.Release?.IndexerId.ToString(); request.RateLimitKey = remoteBook?.Release?.IndexerId.ToString();
// TODO: Look into moving download request handling to indexer
if (remoteBook.Release.BasicAuthString.IsNotNullOrWhiteSpace())
{
request.Headers.Set("Authorization", "Basic " + remoteBook.Release.BasicAuthString);
}
nzbData = _httpClient.Get(request).ResponseData; nzbData = _httpClient.Get(request).ResponseData;
_logger.Debug("Downloaded nzb for release '{0}' finished ({1} bytes from {2})", remoteBook.Release.Title, nzbData.Length, url); _logger.Debug("Downloaded nzb for release '{0}' finished ({1} bytes from {2})", remoteBook.Release.Title, nzbData.Length, url);

@ -156,7 +156,6 @@ namespace NzbDrone.Core.Indexers
releaseInfo.Title = GetTitle(item); releaseInfo.Title = GetTitle(item);
releaseInfo.PublishDate = GetPublishDate(item); releaseInfo.PublishDate = GetPublishDate(item);
releaseInfo.DownloadUrl = GetDownloadUrl(item); releaseInfo.DownloadUrl = GetDownloadUrl(item);
releaseInfo.BasicAuthString = GetBasicAuth();
releaseInfo.InfoUrl = GetInfoUrl(item); releaseInfo.InfoUrl = GetInfoUrl(item);
releaseInfo.CommentUrl = GetCommentUrl(item); releaseInfo.CommentUrl = GetCommentUrl(item);
releaseInfo.Categories = GetCategories(item); releaseInfo.Categories = GetCategories(item);
@ -200,11 +199,6 @@ namespace NzbDrone.Core.Indexers
return XElementExtensions.ParseDate(dateString); return XElementExtensions.ParseDate(dateString);
} }
protected virtual string GetBasicAuth()
{
return null;
}
protected virtual string GetDownloadUrl(XElement item) protected virtual string GetDownloadUrl(XElement item)
{ {
if (UseEnclosureUrl) if (UseEnclosureUrl)

@ -11,7 +11,6 @@ namespace NzbDrone.Core.Parser.Model
public string Title { get; set; } public string Title { get; set; }
public long Size { get; set; } public long Size { get; set; }
public string DownloadUrl { get; set; } public string DownloadUrl { get; set; }
public string BasicAuthString { get; set; }
public string InfoUrl { get; set; } public string InfoUrl { get; set; }
public string CommentUrl { get; set; } public string CommentUrl { get; set; }
public int IndexerId { get; set; } public int IndexerId { get; set; }

Loading…
Cancel
Save