2013-07-19 05:47:55 +02:00
|
|
|
|
using NzbDrone.Core.Tv;
|
2013-05-20 01:17:32 +02:00
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Notifications.Growl
|
|
|
|
|
{
|
2013-05-20 04:43:22 +02:00
|
|
|
|
public class Growl : NotificationBase<GrowlSettings>
|
2013-05-20 01:17:32 +02:00
|
|
|
|
{
|
2013-06-13 08:41:26 +02:00
|
|
|
|
private readonly IGrowlService _growlProvider;
|
2013-05-20 01:17:32 +02:00
|
|
|
|
|
2013-06-13 08:41:26 +02:00
|
|
|
|
public Growl(IGrowlService growlProvider)
|
2013-05-20 01:17:32 +02:00
|
|
|
|
{
|
|
|
|
|
_growlProvider = growlProvider;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override string Name
|
|
|
|
|
{
|
|
|
|
|
get { return "Growl"; }
|
|
|
|
|
}
|
|
|
|
|
|
2013-06-13 08:41:26 +02:00
|
|
|
|
public override string ImplementationName
|
|
|
|
|
{
|
|
|
|
|
get { return "Growl"; }
|
|
|
|
|
}
|
|
|
|
|
|
2013-07-27 22:57:41 +02:00
|
|
|
|
public override string Link
|
|
|
|
|
{
|
|
|
|
|
get { return "http://growl.info/"; }
|
|
|
|
|
}
|
|
|
|
|
|
2013-05-20 01:17:32 +02:00
|
|
|
|
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)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|