2013-07-25 07:24:09 +00:00
|
|
|
|
using NzbDrone.Core.Notifications.Prowl;
|
|
|
|
|
using NzbDrone.Core.Tv;
|
|
|
|
|
using Prowlin;
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Notifications.Pushover
|
|
|
|
|
{
|
|
|
|
|
public class Pushover : NotificationBase<PushoverSettings>
|
|
|
|
|
{
|
|
|
|
|
private readonly IPushoverService _pushoverService;
|
|
|
|
|
|
|
|
|
|
public Pushover(IPushoverService pushoverService)
|
|
|
|
|
{
|
|
|
|
|
_pushoverService = pushoverService;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override string Name
|
|
|
|
|
{
|
|
|
|
|
get { return "Pushover"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override string ImplementationName
|
|
|
|
|
{
|
|
|
|
|
get { return "Pushover"; }
|
|
|
|
|
}
|
|
|
|
|
|
2013-07-27 20:57:41 +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";
|
|
|
|
|
|
|
|
|
|
_pushoverService.SendNotification(title, message, Settings.UserKey, (PushoverPriority)Settings.Priority);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void OnDownload(string message, Series series)
|
|
|
|
|
{
|
|
|
|
|
const string title = "Episode Downloaded";
|
|
|
|
|
|
|
|
|
|
_pushoverService.SendNotification(title, message, Settings.UserKey, (PushoverPriority)Settings.Priority);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void AfterRename(Series series)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|