mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-28 23:16:32 -04:00
Implement equality checks for providers
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using FluentValidation;
|
||||
using FluentValidation;
|
||||
using NzbDrone.Core.Annotations;
|
||||
using NzbDrone.Core.ThingiProvider;
|
||||
using NzbDrone.Core.Validation;
|
||||
using NzbDrone.Core.Validation.Paths;
|
||||
|
||||
@@ -16,9 +15,9 @@ namespace NzbDrone.Core.Notifications.CustomScript
|
||||
}
|
||||
}
|
||||
|
||||
public class CustomScriptSettings : IProviderConfig
|
||||
public class CustomScriptSettings : NotificationSettingsBase<CustomScriptSettings>
|
||||
{
|
||||
private static readonly CustomScriptSettingsValidator Validator = new CustomScriptSettingsValidator();
|
||||
private static readonly CustomScriptSettingsValidator Validator = new ();
|
||||
|
||||
[FieldDefinition(0, Label = "Path", Type = FieldType.FilePath)]
|
||||
public string Path { get; set; }
|
||||
@@ -26,7 +25,7 @@ namespace NzbDrone.Core.Notifications.CustomScript
|
||||
[FieldDefinition(1, Label = "NotificationsCustomScriptSettingsArguments", HelpText = "NotificationsCustomScriptSettingsArgumentsHelpText", Hidden = HiddenType.HiddenIfNotSet)]
|
||||
public string Arguments { get; set; }
|
||||
|
||||
public NzbDroneValidationResult Validate()
|
||||
public override NzbDroneValidationResult Validate()
|
||||
{
|
||||
return new NzbDroneValidationResult(Validator.Validate(this));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user