2013-05-20 01:17:32 +02:00
|
|
|
|
using System;
|
|
|
|
|
using NzbDrone.Core.Annotations;
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Notifications.Prowl
|
|
|
|
|
{
|
|
|
|
|
public class ProwlSettings : INotifcationSettings
|
|
|
|
|
{
|
2013-07-27 22:57:41 +02:00
|
|
|
|
[FieldDefinition(0, Label = "API Key", HelpLink = "https://www.prowlapp.com/api_settings.php")]
|
2013-05-20 01:17:32 +02:00
|
|
|
|
public String ApiKey { get; set; }
|
|
|
|
|
|
2013-06-28 03:55:45 +02:00
|
|
|
|
[FieldDefinition(1, Label = "Priority", Type = FieldType.Select, SelectOptions= typeof(ProwlPriority) )]
|
2013-06-13 09:20:33 +02:00
|
|
|
|
public Int32 Priority { get; set; }
|
2013-05-20 01:17:32 +02:00
|
|
|
|
|
|
|
|
|
public bool IsValid
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2013-05-20 04:43:22 +02:00
|
|
|
|
return !string.IsNullOrWhiteSpace(ApiKey) && Priority != null & Priority >= -2 && Priority <= 2;
|
2013-05-20 01:17:32 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|