2013-05-19 23:17:32 +00:00
|
|
|
|
using NzbDrone.Core.Tv;
|
|
|
|
|
using Prowlin;
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Notifications.Prowl
|
|
|
|
|
{
|
2013-05-20 02:43:22 +00:00
|
|
|
|
public class Prowl : NotificationBase<ProwlSettings>
|
2013-05-19 23:17:32 +00:00
|
|
|
|
{
|
2013-06-13 06:41:26 +00:00
|
|
|
|
private readonly IProwlService _prowlProvider;
|
2013-05-19 23:17:32 +00:00
|
|
|
|
|
2013-06-13 06:41:26 +00:00
|
|
|
|
public Prowl(IProwlService prowlProvider)
|
2013-05-19 23:17:32 +00:00
|
|
|
|
{
|
|
|
|
|
_prowlProvider = prowlProvider;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override string Name
|
|
|
|
|
{
|
|
|
|
|
get { return "Prowl"; }
|
|
|
|
|
}
|
|
|
|
|
|
2013-06-13 06:41:26 +00:00
|
|
|
|
public override string ImplementationName
|
|
|
|
|
{
|
|
|
|
|
get { return "Prowl"; }
|
|
|
|
|
}
|
|
|
|
|
|
2013-07-27 20:57:41 +00:00
|
|
|
|
public override string Link
|
|
|
|
|
{
|
|
|
|
|
get { return "http://www.prowlapp.com/"; }
|
|
|
|
|
}
|
|
|
|
|
|
2013-05-19 23:17:32 +00:00
|
|
|
|
public override void OnGrab(string message)
|
|
|
|
|
{
|
|
|
|
|
const string title = "Episode Grabbed";
|
|
|
|
|
|
|
|
|
|
_prowlProvider.SendNotification(title, message, Settings.ApiKey, (NotificationPriority)Settings.Priority);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void OnDownload(string message, Series series)
|
|
|
|
|
{
|
|
|
|
|
const string title = "Episode Downloaded";
|
|
|
|
|
|
|
|
|
|
_prowlProvider.SendNotification(title, message, Settings.ApiKey, (NotificationPriority)Settings.Priority);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void AfterRename(Series series)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|