2013-05-20 01:17:32 +02:00
|
|
|
|
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", HelpText = "API Key for Prowl")]
|
|
|
|
|
public String ApiKey { get; set; }
|
|
|
|
|
|
|
|
|
|
[FieldDefinition(1, Label = "Priority", HelpText = "Priority to send messages at")]
|
2013-05-20 04:43:22 +02:00
|
|
|
|
public Nullable<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
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|