Updated NzbDrone to Sonarr in notifications

pull/141/head
Mark McDowall 10 years ago
parent e226bf19e1
commit 86a12f95d2

@ -72,7 +72,7 @@ namespace NzbDrone.Core.Notifications.Email
try try
{ {
SendEmail(settings, "NzbDrone - Test Notification", body); SendEmail(settings, "Sonarr - Test Notification", body);
} }
catch (Exception ex) catch (Exception ex)
{ {

@ -22,6 +22,7 @@ namespace NzbDrone.Core.Notifications.Growl
{ {
private readonly Logger _logger; private readonly Logger _logger;
//TODO: Change this to Sonarr, but it is a breaking change (v3)
private readonly Application _growlApplication = new Application("NzbDrone"); private readonly Application _growlApplication = new Application("NzbDrone");
private readonly NotificationType[] _notificationTypes; private readonly NotificationType[] _notificationTypes;
@ -102,7 +103,7 @@ namespace NzbDrone.Core.Notifications.Growl
private void Register(string host, int port, string password) private void Register(string host, int port, string password)
{ {
_logger.Debug("Registering NzbDrone with Growl host: {0}:{1}", host, port); _logger.Debug("Registering Sonarr with Growl host: {0}:{1}", host, port);
var growlConnector = GetGrowlConnector(host, port, password); var growlConnector = GetGrowlConnector(host, port, password);
@ -146,7 +147,7 @@ namespace NzbDrone.Core.Notifications.Growl
Register(settings.Host, settings.Port, settings.Password); Register(settings.Host, settings.Port, settings.Password);
const string title = "Test Notification"; const string title = "Test Notification";
const string body = "This is a test message from NzbDrone"; const string body = "This is a test message from Sonarr";
SendNotification(title, body, "TEST", settings.Host, settings.Port, settings.Password); SendNotification(title, body, "TEST", settings.Host, settings.Port, settings.Password);
} }

@ -32,7 +32,7 @@ namespace NzbDrone.Core.Notifications.NotifyMyAndroid
var request = new RestRequest("notify", Method.POST); var request = new RestRequest("notify", Method.POST);
request.RequestFormat = DataFormat.Xml; request.RequestFormat = DataFormat.Xml;
request.AddParameter("apikey", apiKey); request.AddParameter("apikey", apiKey);
request.AddParameter("application", "NzbDrone"); request.AddParameter("application", "Sonarr");
request.AddParameter("event", title); request.AddParameter("event", title);
request.AddParameter("description", message); request.AddParameter("description", message);
request.AddParameter("priority", (int)priority); request.AddParameter("priority", (int)priority);
@ -69,7 +69,7 @@ namespace NzbDrone.Core.Notifications.NotifyMyAndroid
try try
{ {
const string title = "Test Notification"; const string title = "Test Notification";
const string body = "This is a test message from NzbDrone"; const string body = "This is a test message from Sonarr";
Verify(settings.ApiKey); Verify(settings.ApiKey);
SendNotification(title, body, settings.ApiKey, (NotifyMyAndroidPriority)settings.Priority); SendNotification(title, body, settings.ApiKey, (NotifyMyAndroidPriority)settings.Priority);
} }

@ -26,7 +26,7 @@ namespace NzbDrone.Core.Notifications.Prowl
{ {
var notification = new Prowlin.Notification var notification = new Prowlin.Notification
{ {
Application = "NzbDrone", Application = "Sonarr",
Description = message, Description = message,
Event = title, Event = title,
Priority = priority, Priority = priority,
@ -88,7 +88,7 @@ namespace NzbDrone.Core.Notifications.Prowl
Verify(settings.ApiKey); Verify(settings.ApiKey);
const string title = "Test Notification"; const string title = "Test Notification";
const string body = "This is a test message from NzbDrone"; const string body = "This is a test message from Sonarr";
SendNotification(title, body, settings.ApiKey); SendNotification(title, body, settings.ApiKey);
} }

@ -58,8 +58,8 @@ namespace NzbDrone.Core.Notifications.PushBullet
{ {
try try
{ {
const string title = "NzbDrone - Test Notification"; const string title = "Sonarr - Test Notification";
const string body = "This is a test message from NzbDrone"; const string body = "This is a test message from Sonarr";
SendNotification(title, body, settings.ApiKey, settings.DeviceId); SendNotification(title, body, settings.ApiKey, settings.DeviceId);
} }

@ -29,8 +29,8 @@ namespace NzbDrone.Core.Notifications.Pushalot
var client = RestClientFactory.BuildClient(URL); var client = RestClientFactory.BuildClient(URL);
var request = BuildRequest(); var request = BuildRequest();
request.AddParameter("Source", "NzbDrone"); request.AddParameter("Source", "Sonarr");
request.AddParameter("Image", "https://raw.githubusercontent.com/NzbDrone/NzbDrone/master/Logo/128.png"); request.AddParameter("Image", "https://raw.githubusercontent.com/Sonarr/Sonarr/develop/Logo/128.png");
request.AddParameter("Title", title); request.AddParameter("Title", title);
request.AddParameter("Body", message); request.AddParameter("Body", message);
@ -61,7 +61,7 @@ namespace NzbDrone.Core.Notifications.Pushalot
try try
{ {
const string title = "Test Notification"; const string title = "Test Notification";
const string body = "This is a test message from NzbDrone"; const string body = "This is a test message from Sonarr";
SendNotification(title, body, settings); SendNotification(title, body, settings);
} }

@ -44,7 +44,7 @@ namespace NzbDrone.Core.Notifications.Pushover
try try
{ {
const string title = "Test Notification"; const string title = "Test Notification";
const string body = "This is a test message from NzbDrone"; const string body = "This is a test message from Sonarr";
SendNotification(title, body, settings.ApiKey, settings.UserKey, (PushoverPriority)settings.Priority, settings.Sound); SendNotification(title, body, settings.ApiKey, settings.UserKey, (PushoverPriority)settings.Priority, settings.Sound);
} }

@ -23,6 +23,7 @@ namespace NzbDrone.Core.Notifications.Pushover
Priority = 0; Priority = 0;
} }
//TODO: Get Pushover to change our app name (or create a new app) when we have a new logo
[FieldDefinition(0, Label = "API Key", HelpLink = "https://pushover.net/apps/clone/nzbdrone")] [FieldDefinition(0, Label = "API Key", HelpLink = "https://pushover.net/apps/clone/nzbdrone")]
public String ApiKey { get; set; } public String ApiKey { get; set; }

@ -29,7 +29,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
public void Notify(XbmcSettings settings, string title, string message) public void Notify(XbmcSettings settings, string title, string message)
{ {
var notification = String.Format("Notification({0},{1},{2},{3})", title, message, settings.DisplayTime * 1000, "https://raw.github.com/NzbDrone/NzbDrone/develop/Logo/64.png"); var notification = String.Format("Notification({0},{1},{2},{3})", title, message, settings.DisplayTime * 1000, "https://raw.github.com/Sonarr/Sonarr/develop/Logo/64.png");
var command = BuildExecBuiltInCommand(notification); var command = BuildExecBuiltInCommand(notification);
SendCommand(settings, command); SendCommand(settings, command);

@ -41,7 +41,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
var parameters = new Dictionary<String, Object>(); var parameters = new Dictionary<String, Object>();
parameters.Add("title", title); parameters.Add("title", title);
parameters.Add("message", message); parameters.Add("message", message);
parameters.Add("image", "https://raw.github.com/NzbDrone/NzbDrone/develop/Logo/64.png"); parameters.Add("image", "https://raw.github.com/Sonarr/Sonarr/develop/Logo/64.png");
parameters.Add("displaytime", settings.DisplayTime * 1000); parameters.Add("displaytime", settings.DisplayTime * 1000);
ProcessRequest(request, settings, "GUI.ShowNotification", parameters); ProcessRequest(request, settings, "GUI.ShowNotification", parameters);

Loading…
Cancel
Save