1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-11-01 08:22:35 +01:00
Sonarr/NzbDrone.Core/Notifications/Prowl/ProwlSettings.cs
2013-06-27 18:56:05 -07:00

26 lines
692 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NzbDrone.Core.Annotations;
namespace NzbDrone.Core.Notifications.Prowl
{
public class ProwlSettings : INotifcationSettings
{
[FieldDefinition(0, Label = "API Key")]
public String ApiKey { get; set; }
[FieldDefinition(1, Label = "Priority", Type = FieldType.Select, SelectOptions= typeof(ProwlPriority) )]
public Int32 Priority { get; set; }
public bool IsValid
{
get
{
return !string.IsNullOrWhiteSpace(ApiKey) && Priority != null & Priority >= -2 && Priority <= 2;
}
}
}
}