Added links and api key links to notifications

This commit is contained in:
Mark McDowall
2013-07-27 13:57:41 -07:00
parent 35d29df864
commit 625acef635
23 changed files with 90 additions and 9 deletions

View File

@@ -22,6 +22,11 @@ namespace NzbDrone.Core.Notifications.Email
get { return "Email"; }
}
public override string Link
{
get { return null; }
}
public override void OnGrab(string message)
{
const string subject = "NzbDrone [TV] - Grabbed";

View File

@@ -21,6 +21,11 @@ namespace NzbDrone.Core.Notifications.Growl
get { return "Growl"; }
}
public override string Link
{
get { return "http://growl.info/"; }
}
public override void OnGrab(string message)
{
const string title = "Episode Grabbed";

View File

@@ -6,6 +6,7 @@ namespace NzbDrone.Core.Notifications
{
string Name { get; }
string ImplementationName { get; }
string Link { get; }
NotificationDefinition InstanceDefinition { get; set; }

View File

@@ -5,6 +5,7 @@
public int Id { get; set; }
public string Name { get; set; }
public string ImplementationName { get; set; }
public string Link { get; set; }
public bool OnGrab { get; set; }
public bool OnDownload { get; set; }
public INotifcationSettings Settings { get; set; }

View File

@@ -7,6 +7,7 @@ namespace NzbDrone.Core.Notifications
{
public abstract string Name { get; }
public abstract string ImplementationName { get; }
public abstract string Link { get; }
public NotificationDefinition InstanceDefinition { get; set; }

View File

@@ -68,6 +68,7 @@ namespace NzbDrone.Core.Notifications
newNotification.Instance = (INotification)_container.Resolve(type);
newNotification.Id = i;
newNotification.ImplementationName = notification.ImplementationName;
newNotification.Link = notification.Link;
var instanceType = newNotification.Instance.GetType();
var baseGenArgs = instanceType.BaseType.GetGenericArguments();

View File

@@ -21,6 +21,11 @@ namespace NzbDrone.Core.Notifications.Plex
get { return "Plex Client"; }
}
public override string Link
{
get { return "http://www.plexapp.com/"; }
}
public override void OnGrab(string message)
{
const string header = "NzbDrone [TV] - Grabbed";

View File

@@ -21,6 +21,11 @@ namespace NzbDrone.Core.Notifications.Plex
get { return "Plex Server"; }
}
public override string Link
{
get { return "http://www.plexapp.com/"; }
}
public override void OnGrab(string message)
{
}

View File

@@ -22,6 +22,11 @@ namespace NzbDrone.Core.Notifications.Prowl
get { return "Prowl"; }
}
public override string Link
{
get { return "http://www.prowlapp.com/"; }
}
public override void OnGrab(string message)
{
const string title = "Episode Grabbed";

View File

@@ -5,7 +5,7 @@ namespace NzbDrone.Core.Notifications.Prowl
{
public class ProwlSettings : INotifcationSettings
{
[FieldDefinition(0, Label = "API Key")]
[FieldDefinition(0, Label = "API Key", HelpLink = "https://www.prowlapp.com/api_settings.php")]
public String ApiKey { get; set; }
[FieldDefinition(1, Label = "Priority", Type = FieldType.Select, SelectOptions= typeof(ProwlPriority) )]

View File

@@ -23,6 +23,11 @@ namespace NzbDrone.Core.Notifications.Pushover
get { return "Pushover"; }
}
public override string Link
{
get { return "https://pushover.net/"; }
}
public override void OnGrab(string message)
{
const string title = "Episode Grabbed";

View File

@@ -5,7 +5,7 @@ namespace NzbDrone.Core.Notifications.Pushover
{
public class PushoverSettings : INotifcationSettings
{
[FieldDefinition(0, Label = "User Key")]
[FieldDefinition(0, Label = "User Key", HelpLink = "https://pushover.net/")]
public String UserKey { get; set; }
[FieldDefinition(1, Label = "Priority", Type = FieldType.Select, SelectOptions = typeof(PushoverPriority) )]

View File

@@ -22,6 +22,11 @@ namespace NzbDrone.Core.Notifications.Xbmc
get { return "XBMC"; }
}
public override string Link
{
get { return "http://xbmc.org/"; }
}
public override void OnGrab(string message)
{
const string header = "NzbDrone [TV] - Grabbed";