Fixed: Rename (Newznab) nzb.su to nzb.life

rename ApiKeyWhiteList to ApiKeyAllowList

Co-authored-by: Stevie<stevie.robinson@gmail.com>
This commit is contained in:
bakerboy448
2025-09-04 13:07:54 -05:00
parent 770fd64013
commit 516b09ca91
3 changed files with 6 additions and 6 deletions

View File

@@ -100,7 +100,7 @@ namespace NzbDrone.Core.Indexers.Newznab
yield return GetDefinition("Miatrix", GetSettings("https://www.miatrix.com"), categories: new[] { 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000 });
yield return GetDefinition("Newz69", GetSettings("https://newz69.keagaming.com"), categories: new[] { 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000 });
yield return GetDefinition("NinjaCentral", GetSettings("https://ninjacentral.co.za"), categories: new[] { 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000 });
yield return GetDefinition("Nzb.su", GetSettings("https://api.nzb.life"), categories: new[] { 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000 });
yield return GetDefinition("Nzb.life", GetSettings("https://api.nzb.life"), categories: new[] { 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000 });
yield return GetDefinition("NZBCat", GetSettings("https://nzb.cat"), categories: new[] { 1000, 2000, 3000, 4000, 5000, 6000, 7000 });
yield return GetDefinition("NZBFinder", GetSettings("https://nzbfinder.ws"), categories: new[] { 2000, 3000, 5000, 6000, 7000 });
yield return GetDefinition("NZBgeek", GetSettings("https://api.nzbgeek.info"), categories: new[] { 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000 });

View File

@@ -9,10 +9,10 @@ namespace NzbDrone.Core.Indexers.Newznab
{
public class NewznabSettingsValidator : AbstractValidator<NewznabSettings>
{
private static readonly string[] ApiKeyWhiteList =
private static readonly string[] ApiKeyAllowList =
{
"nzbs.org",
"nzb.su",
"nzb.life",
"dognzb.cr",
"nzbplanet.net",
"nzbid.org",
@@ -22,7 +22,7 @@ namespace NzbDrone.Core.Indexers.Newznab
private static bool ShouldHaveApiKey(NewznabSettings settings)
{
return settings.BaseUrl != null && ApiKeyWhiteList.Any(c => settings.BaseUrl.ToLowerInvariant().Contains(c));
return settings.BaseUrl != null && ApiKeyAllowList.Any(c => settings.BaseUrl.ToLowerInvariant().Contains(c));
}
private static readonly Regex AdditionalParametersRegex = new Regex(@"(&.+?\=.+?)+", RegexOptions.Compiled);

View File

@@ -11,11 +11,11 @@ namespace NzbDrone.Core.Indexers.Torznab
{
public class TorznabSettingsValidator : AbstractValidator<TorznabSettings>
{
private static readonly string[] ApiKeyWhiteList = Array.Empty<string>();
private static readonly string[] ApiKeyAllowList = Array.Empty<string>();
private static bool ShouldHaveApiKey(TorznabSettings settings)
{
return settings.BaseUrl != null && ApiKeyWhiteList.Any(c => settings.BaseUrl.ToLowerInvariant().Contains(c));
return settings.BaseUrl != null && ApiKeyAllowList.Any(c => settings.BaseUrl.ToLowerInvariant().Contains(c));
}
private static readonly Regex AdditionalParametersRegex = new Regex(@"(&.+?\=.+?)+", RegexOptions.Compiled);