1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

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 @@ public ValidationFailure Test(EmailSettings settings)
try
{
SendEmail(settings, "NzbDrone - Test Notification", body);
SendEmail(settings, "Sonarr - Test Notification", body);
}
catch (Exception ex)
{

View File

@ -22,6 +22,7 @@ public class GrowlService : IGrowlService
{
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 @@ public void SendNotification(string title, string message, string notificationTy
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 @@ public ValidationFailure Test(GrowlSettings settings)
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 @@ public void SendNotification(string title, string message, string apiKey, Notify
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 @@ public ValidationFailure Test(NotifyMyAndroidSettings settings)
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 @@ public void SendNotification(string title, string message, string apiKey, Notifi
{
var notification = new Prowlin.Notification
{
Application = "NzbDrone",
Application = "Sonarr",
Description = message,
Event = title,
Priority = priority,
@ -88,7 +88,7 @@ public ValidationFailure Test(ProwlSettings settings)
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 @@ public ValidationFailure Test(PushBulletSettings settings)
{
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 @@ public void SendNotification(String title, String message, PushalotSettings sett
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 @@ public ValidationFailure Test(PushalotSettings settings)
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 @@ public ValidationFailure Test(PushoverSettings settings)
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 @@ public PushoverSettings()
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 @@ public bool CanHandle(XbmcVersion version)
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 @@ public void Notify(XbmcSettings settings, String title, String message)
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);