1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/NzbDrone.Core/Notifications/Growl/Growl.cs
Mark McDowall 8cac7ed1cd Notifications can be tested
Notification ImplementationType was added for showing in UI (Humanized/Title cased of Implementation)
2013-06-12 23:47:56 -07:00

46 lines
1.1 KiB
C#

using System;
using NLog;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Tv;
namespace NzbDrone.Core.Notifications.Growl
{
public class Growl : NotificationBase<GrowlSettings>
{
private readonly IGrowlService _growlProvider;
public Growl(IGrowlService growlProvider)
{
_growlProvider = growlProvider;
}
public override string Name
{
get { return "Growl"; }
}
public override string ImplementationName
{
get { return "Growl"; }
}
public override void OnGrab(string message)
{
const string title = "Episode Grabbed";
_growlProvider.SendNotification(title, message, "GRAB", Settings.Host, Settings.Port, Settings.Password);
}
public override void OnDownload(string message, Series series)
{
const string title = "Episode Downloaded";
_growlProvider.SendNotification(title, message, "DOWNLOAD", Settings.Host, Settings.Port, Settings.Password);
}
public override void AfterRename(Series series)
{
}
}
}