mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
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:
@@ -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("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("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("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("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("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 });
|
yield return GetDefinition("NZBgeek", GetSettings("https://api.nzbgeek.info"), categories: new[] { 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000 });
|
||||||
|
@@ -9,10 +9,10 @@ namespace NzbDrone.Core.Indexers.Newznab
|
|||||||
{
|
{
|
||||||
public class NewznabSettingsValidator : AbstractValidator<NewznabSettings>
|
public class NewznabSettingsValidator : AbstractValidator<NewznabSettings>
|
||||||
{
|
{
|
||||||
private static readonly string[] ApiKeyWhiteList =
|
private static readonly string[] ApiKeyAllowList =
|
||||||
{
|
{
|
||||||
"nzbs.org",
|
"nzbs.org",
|
||||||
"nzb.su",
|
"nzb.life",
|
||||||
"dognzb.cr",
|
"dognzb.cr",
|
||||||
"nzbplanet.net",
|
"nzbplanet.net",
|
||||||
"nzbid.org",
|
"nzbid.org",
|
||||||
@@ -22,7 +22,7 @@ namespace NzbDrone.Core.Indexers.Newznab
|
|||||||
|
|
||||||
private static bool ShouldHaveApiKey(NewznabSettings settings)
|
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);
|
private static readonly Regex AdditionalParametersRegex = new Regex(@"(&.+?\=.+?)+", RegexOptions.Compiled);
|
||||||
|
@@ -11,11 +11,11 @@ namespace NzbDrone.Core.Indexers.Torznab
|
|||||||
{
|
{
|
||||||
public class TorznabSettingsValidator : AbstractValidator<TorznabSettings>
|
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)
|
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);
|
private static readonly Regex AdditionalParametersRegex = new Regex(@"(&.+?\=.+?)+", RegexOptions.Compiled);
|
||||||
|
Reference in New Issue
Block a user