1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-28 02:37:40 +00:00
Sonarr/NzbDrone.Core/Notifications/Prowl/ProwlSettings.cs

26 lines
692 B
C#
Raw Normal View History

2013-05-19 23:17:32 +00: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
{
2013-06-28 01:55:45 +00:00
[FieldDefinition(0, Label = "API Key")]
2013-05-19 23:17:32 +00:00
public String ApiKey { get; set; }
2013-06-28 01:55:45 +00:00
[FieldDefinition(1, Label = "Priority", Type = FieldType.Select, SelectOptions= typeof(ProwlPriority) )]
2013-06-13 07:20:33 +00:00
public Int32 Priority { get; set; }
2013-05-19 23:17:32 +00:00
public bool IsValid
{
get
{
2013-05-20 02:43:22 +00:00
return !string.IsNullOrWhiteSpace(ApiKey) && Priority != null & Priority >= -2 && Priority <= 2;
2013-05-19 23:17:32 +00:00
}
}
}
}