mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-26 22:46:37 -04:00
Refactored HttpRequest and HttpRequestBuilder, moving most of the logic to the HttpRequestBuilder.
Added ContentSummary to be able to describe the ContentData in a human readable form. (Useful for JsonRpc and FormData).
This commit is contained in:
@@ -266,18 +266,18 @@ namespace NzbDrone.Core.Indexers
|
||||
|
||||
try
|
||||
{
|
||||
var uri = new Uri(value, UriKind.RelativeOrAbsolute);
|
||||
var url = new Uri(value, UriKind.RelativeOrAbsolute);
|
||||
|
||||
if (!uri.IsAbsoluteUri)
|
||||
if (!url.IsAbsoluteUri)
|
||||
{
|
||||
uri = new Uri(_indexerResponse.HttpRequest.Url, uri);
|
||||
url = new Uri(_indexerResponse.HttpRequest.Url, url);
|
||||
}
|
||||
|
||||
return uri.AbsoluteUri;
|
||||
return url.AbsoluteUri;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Debug(ex, string.Format("Failed to parse Uri {0}, ignoring.", value));
|
||||
_logger.Debug(ex, string.Format("Failed to parse Url {0}, ignoring.", value));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user