Updated NzbDrone to Sonarr in notifications

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

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

@ -22,6 +22,7 @@ namespace NzbDrone.Core.Notifications.Growl
{
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 NotificationType[] _notificationTypes;
@ -102,7 +103,7 @@ namespace NzbDrone.Core.Notifications.Growl
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);
@ -146,7 +147,7 @@ namespace NzbDrone.Core.Notifications.Growl
Register(settings.Host, settings.Port, settings.Password);
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);
}

@ -32,7 +32,7 @@ namespace NzbDrone.Core.Notifications.NotifyMyAndroid
var request = new RestRequest("notify", Method.POST);
request.RequestFormat = DataFormat.Xml;
request.AddParameter("apikey", apiKey);
request.AddParameter("application", "NzbDrone");
request.AddParameter("application", "Sonarr");
request.AddParameter("event", title);
request.AddParameter("description", message);
request.AddParameter("priority", (int)priority);
@ -69,7 +69,7 @@ namespace NzbDrone.Core.Notifications.NotifyMyAndroid
try
{
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);
SendNotification(title, body, settings.ApiKey, (NotifyMyAndroidPriority)settings.Priority);
}

@ -26,7 +26,7 @@ namespace NzbDrone.Core.Notifications.Prowl
{
var notification = new Prowlin.Notification
{
Application = "NzbDrone",
Application = "Sonarr",
Description = message,
Event = title,
Priority = priority,
@ -88,7 +88,7 @@ namespace NzbDrone.Core.Notifications.Prowl
Verify(settings.ApiKey);
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);
}

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

@ -29,8 +29,8 @@ namespace NzbDrone.Core.Notifications.Pushalot
var client = RestClientFactory.BuildClient(URL);
var request = BuildRequest();
request.AddParameter("Source", "NzbDrone");
request.AddParameter("Image", "https://raw.githubusercontent.com/NzbDrone/NzbDrone/master/Logo/128.png");
request.AddParameter("Source", "Sonarr");
request.AddParameter("Image", "https://raw.githubusercontent.com/Sonarr/Sonarr/develop/Logo/128.png");
request.AddParameter("Title", title);
request.AddParameter("Body", message);
@ -61,7 +61,7 @@ namespace NzbDrone.Core.Notifications.Pushalot
try
{
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);
}

@ -44,7 +44,7 @@ namespace NzbDrone.Core.Notifications.Pushover
try
{
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);
}

@ -23,6 +23,7 @@ namespace NzbDrone.Core.Notifications.Pushover
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")]
public String ApiKey { get; set; }

@ -29,7 +29,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
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);
SendCommand(settings, command);

@ -41,7 +41,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
var parameters = new Dictionary<String, Object>();
parameters.Add("title", title);
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);
ProcessRequest(request, settings, "GUI.ShowNotification", parameters);

Loading…
Cancel
Save