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