1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-24 08:42:53 +00:00

Fixed: Update Growl Notifications

This commit is contained in:
Qstick 2018-04-15 15:31:49 -04:00
parent 2b2c242c6f
commit c3800c66ad
2 changed files with 8 additions and 8 deletions

View file

@ -25,12 +25,12 @@ public override void OnGrab(GrabMessage grabMessage)
public override void OnDownload(TrackDownloadMessage message)
{
_growlService.SendNotification(TRACK_DOWNLOADED_TITLE, message.Message, "DOWNLOAD", Settings.Host, Settings.Port, Settings.Password);
_growlService.SendNotification(TRACK_DOWNLOADED_TITLE, message.Message, "TRACKDOWNLOAD", Settings.Host, Settings.Port, Settings.Password);
}
public override void OnAlbumDownload(AlbumDownloadMessage message)
{
_growlService.SendNotification(ALBUM_DOWNLOADED_TITLE, message.Message, "DOWNLOAD", Settings.Host, Settings.Port, Settings.Password);
_growlService.SendNotification(ALBUM_DOWNLOADED_TITLE, message.Message, "ALBUMDOWNLOAD", Settings.Host, Settings.Port, Settings.Password);
}
public override ValidationResult Test()

View file

@ -1,4 +1,4 @@
using FluentValidation.Results;
using FluentValidation.Results;
using Growl.Connector;
using Growl.CoreLibrary;
using NzbDrone.Common.Extensions;
@ -20,9 +20,8 @@ public interface IGrowlService
public class GrowlService : IGrowlService
{
private readonly Logger _logger;
//TODO: Change this to Lidarr, but it is a breaking change (v3)
private readonly Application _growlApplication = new Application("NzbDrone");
private readonly Application _growlApplication = new Application("Lidarr");
private readonly NotificationType[] _notificationTypes;
private class GrowlRequestState
@ -133,8 +132,9 @@ private NotificationType[] GetNotificationTypes()
{
var notificationTypes = new List<NotificationType>();
notificationTypes.Add(new NotificationType("TEST", "Test"));
notificationTypes.Add(new NotificationType("GRAB", "Episode Grabbed"));
notificationTypes.Add(new NotificationType("DOWNLOAD", "Episode Complete"));
notificationTypes.Add(new NotificationType("GRAB", "Album Grabbed"));
notificationTypes.Add(new NotificationType("TRACKDOWNLOAD", "Track Complete"));
notificationTypes.Add(new NotificationType("ALBUMDOWNLOAD", "Album Complete"));
return notificationTypes.ToArray();
}