mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Reformat and apply Stylecop rules
This commit is contained in:
@@ -63,7 +63,6 @@ namespace NzbDrone.Core.Indexers
|
||||
var generator = GetRequestGenerator();
|
||||
|
||||
//A func ensures cookies are always updated to the latest. This way, the first page could update the cookies and then can be reused by the second page.
|
||||
|
||||
generator.GetCookies = () =>
|
||||
{
|
||||
var cookies = _indexerStatusService.GetIndexerCookies(Definition.Id);
|
||||
@@ -86,7 +85,6 @@ namespace NzbDrone.Core.Indexers
|
||||
return requests;
|
||||
}
|
||||
|
||||
|
||||
protected virtual IList<ReleaseInfo> FetchReleases(Func<IIndexerRequestGenerator, IndexerPageableRequestChain> pageableRequestChainSelector, bool isRecent = false)
|
||||
{
|
||||
var releases = new List<ReleaseInfo>();
|
||||
@@ -133,6 +131,7 @@ namespace NzbDrone.Core.Indexers
|
||||
fullyUpdated = true;
|
||||
break;
|
||||
}
|
||||
|
||||
var oldestReleaseDate = page.Select(v => v.PublishDate).Min();
|
||||
if (oldestReleaseDate < lastReleaseInfo.PublishDate || page.Any(v => v.DownloadUrl == lastReleaseInfo.DownloadUrl))
|
||||
{
|
||||
@@ -177,6 +176,7 @@ namespace NzbDrone.Core.Indexers
|
||||
var gapEnd = ordered.Last().PublishDate;
|
||||
_logger.Warn("Indexer {0} rss sync didn't cover the period between {1} and {2} UTC. Search may be required.", Definition.Name, gapStart, gapEnd);
|
||||
}
|
||||
|
||||
lastReleaseInfo = ordered.First();
|
||||
_indexerStatusService.UpdateRssSyncStatus(Definition.Id, lastReleaseInfo);
|
||||
}
|
||||
@@ -215,6 +215,7 @@ namespace NzbDrone.Core.Indexers
|
||||
{
|
||||
_indexerStatusService.RecordFailure(Definition.Id, TimeSpan.FromHours(1));
|
||||
}
|
||||
|
||||
_logger.Warn("API Request Limit reached for {0}", this);
|
||||
}
|
||||
catch (HttpException ex)
|
||||
@@ -285,7 +286,7 @@ namespace NzbDrone.Core.Indexers
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.WithData(response.HttpResponse, 128*1024);
|
||||
ex.WithData(response.HttpResponse, 128 * 1024);
|
||||
_logger.Trace("Unexpected Response content ({0} bytes): {1}", response.HttpResponse.ResponseData.Length, response.HttpResponse.Content);
|
||||
throw;
|
||||
}
|
||||
@@ -385,5 +386,4 @@ namespace NzbDrone.Core.Indexers
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user