1
0
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:
Bogdan
2024-04-14 07:16:26 +03:00
committed by Mark McDowall
parent 536ff142c3
commit 084fcc2295
84 changed files with 517 additions and 312 deletions
@@ -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));
}