mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-17 21:44:48 -04:00
Fixed: (Cardigann) Skip duplicated GET requests
This commit is contained in:
@@ -1073,9 +1073,9 @@ namespace NzbDrone.Core.Indexers.Definitions.Cardigann
|
||||
variables[".Query.Keywords"] = string.Join(" ", keywordTokens);
|
||||
variables[".Keywords"] = ApplyFilters((string)variables[".Query.Keywords"], search.Keywordsfilters, variables);
|
||||
|
||||
// TODO: prepare queries first and then send them parallel
|
||||
var searchPaths = search.Paths;
|
||||
foreach (var searchPath in searchPaths)
|
||||
var searchUrls = new List<string>();
|
||||
|
||||
foreach (var searchPath in search.Paths)
|
||||
{
|
||||
variables[".Categories"] = mappedCategories;
|
||||
|
||||
@@ -1158,14 +1158,20 @@ namespace NzbDrone.Core.Indexers.Definitions.Cardigann
|
||||
}
|
||||
}
|
||||
|
||||
if (method == HttpMethod.Get)
|
||||
if (method == HttpMethod.Get && queryCollection.Count > 0)
|
||||
{
|
||||
if (queryCollection.Count > 0)
|
||||
{
|
||||
searchUrl += "?" + queryCollection.GetQueryString(_encoding);
|
||||
}
|
||||
searchUrl += "?" + queryCollection.GetQueryString(_encoding);
|
||||
}
|
||||
|
||||
if (method == HttpMethod.Get && searchUrls.Contains(searchUrl))
|
||||
{
|
||||
_logger.Trace("Skip duplicated request {0}", searchUrl);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
searchUrls.Add(searchUrl);
|
||||
|
||||
_logger.Debug($"Adding request: {searchUrl}");
|
||||
|
||||
var requestBuilder = new HttpRequestBuilder(searchUrl)
|
||||
|
||||
Reference in New Issue
Block a user