Lidarr/src/NzbDrone.Core/Notifications/Pushover/Pushover.cs

38 lines
1.1 KiB
C#
Raw Normal View History

2013-08-04 17:27:06 +00:00
using NzbDrone.Core.Tv;
2013-07-25 07:24:09 +00:00
namespace NzbDrone.Core.Notifications.Pushover
{
public class Pushover : NotificationBase<PushoverSettings>
{
private readonly IPushoverProxy _pushoverProxy;
public Pushover(IPushoverProxy pushoverProxy)
2013-07-25 07:24:09 +00:00
{
_pushoverProxy = pushoverProxy;
2013-07-25 07:24:09 +00:00
}
public override string Link
{
get { return "https://pushover.net/"; }
}
2013-07-25 07:24:09 +00:00
public override void OnGrab(string message)
{
const string title = "Episode Grabbed";
_pushoverProxy.SendNotification(title, message, Settings.ApiKey, Settings.UserKey, (PushoverPriority)Settings.Priority, Settings.Sound);
2013-07-25 07:24:09 +00:00
}
public override void OnDownload(DownloadMessage message)
2013-07-25 07:24:09 +00:00
{
const string title = "Episode Downloaded";
_pushoverProxy.SendNotification(title, message.Message, Settings.ApiKey, Settings.UserKey, (PushoverPriority)Settings.Priority, Settings.Sound);
2013-07-25 07:24:09 +00:00
}
public override void AfterRename(Series series)
{
}
}
}