New: Use better page size for Newznab/Torznab (up to 100) when supported by the indexer

(cherry picked from commit ddb25b109575cc378462a1c3a64705f2003f01f0)

Closes #2181
This commit is contained in:
bakerboy448
2023-02-12 16:34:04 -06:00
committed by Bogdan
parent b04b483f86
commit ad7b110a0b
4 changed files with 24 additions and 6 deletions
@@ -19,7 +19,7 @@ namespace NzbDrone.Core.Indexers.Torznab
public override string Name => "Torznab";
public override DownloadProtocol Protocol => DownloadProtocol.Torrent;
public override int PageSize => _capabilitiesProvider.GetCapabilities(Settings).DefaultPageSize;
public override int PageSize => Math.Min(100, Math.Max(_capabilitiesProvider.GetCapabilities(Settings).DefaultPageSize, _capabilitiesProvider.GetCapabilities(Settings).MaxPageSize));
public override IIndexerRequestGenerator GetRequestGenerator()
{