Updated NzbDrone to Sonarr in notifications

This commit is contained in:
Mark McDowall 2014-11-25 07:21:33 -08:00
parent e226bf19e1
commit 86a12f95d2
10 changed files with 17 additions and 15 deletions

View File

@ -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)
{

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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; }

View File

@ -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);

View File

@ -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);