mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-12-29 09:05:28 +01:00
New: omgwtfnzbs delay now configurable (advanced)
This commit is contained in:
@@ -92,7 +92,7 @@ namespace NzbDrone.Core.Indexers.Omgwtfnzbs
|
||||
private IEnumerable<IndexerRequest> GetPagedRequests(String query)
|
||||
{
|
||||
var url = new StringBuilder();
|
||||
url.AppendFormat("{0}?catid=19,20&user={1}&api={2}&eng=1&delay=30", BaseUrl, Settings.Username, Settings.ApiKey);
|
||||
url.AppendFormat("{0}?catid=19,20&user={1}&api={2}&eng=1&delay={3}", BaseUrl, Settings.Username, Settings.ApiKey, Settings.Delay);
|
||||
|
||||
if (query.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using FluentValidation;
|
||||
using FluentValidation;
|
||||
using FluentValidation.Results;
|
||||
using NzbDrone.Core.Annotations;
|
||||
using NzbDrone.Core.ThingiProvider;
|
||||
@@ -12,6 +11,7 @@ namespace NzbDrone.Core.Indexers.Omgwtfnzbs
|
||||
{
|
||||
RuleFor(c => c.Username).NotEmpty();
|
||||
RuleFor(c => c.ApiKey).NotEmpty();
|
||||
RuleFor(c => c.Delay).GreaterThanOrEqualTo(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,11 +19,19 @@ namespace NzbDrone.Core.Indexers.Omgwtfnzbs
|
||||
{
|
||||
private static readonly OmgwtfnzbsSettingsValidator Validator = new OmgwtfnzbsSettingsValidator();
|
||||
|
||||
public OmgwtfnzbsSettings()
|
||||
{
|
||||
Delay = 30;
|
||||
}
|
||||
|
||||
[FieldDefinition(0, Label = "Username")]
|
||||
public String Username { get; set; }
|
||||
public string Username { get; set; }
|
||||
|
||||
[FieldDefinition(1, Label = "API Key")]
|
||||
public String ApiKey { get; set; }
|
||||
public string ApiKey { get; set; }
|
||||
|
||||
[FieldDefinition(2, Label = "Delay", HelpText = "Time in minutes to delay new nzbs before they appear on the RSS feed", Advanced = true)]
|
||||
public int Delay { get; set; }
|
||||
|
||||
public ValidationResult Validate()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user