diff --git a/NzbDrone.Core/Providers/Core/ConfigProvider.cs b/NzbDrone.Core/Providers/Core/ConfigProvider.cs index 10a8df3e0..70bdce650 100644 --- a/NzbDrone.Core/Providers/Core/ConfigProvider.cs +++ b/NzbDrone.Core/Providers/Core/ConfigProvider.cs @@ -354,7 +354,7 @@ namespace NzbDrone.Core.Providers.Core public virtual string GrowlHost { - get { return GetValue("GrowlHost", String.Empty); } + get { return GetValue("GrowlHost", "localhost:23053"); } set { SetValue("GrowlHost", value); } } diff --git a/NzbDrone.Web/Controllers/SettingsController.cs b/NzbDrone.Web/Controllers/SettingsController.cs index 89ef7aedf..1b775246c 100644 --- a/NzbDrone.Web/Controllers/SettingsController.cs +++ b/NzbDrone.Web/Controllers/SettingsController.cs @@ -173,7 +173,12 @@ namespace NzbDrone.Web.Controllers SmtpToAddresses = _configProvider.SmtpToAddresses, TwitterEnabled = _externalNotificationProvider.GetSettings(typeof(Twitter)).Enable, TwitterNotifyOnGrab = _configProvider.TwitterNotifyOnGrab, - TwitterNotifyOnDownload = _configProvider.TwitterNotifyOnDownload + TwitterNotifyOnDownload = _configProvider.TwitterNotifyOnDownload, + GrowlEnabled = _externalNotificationProvider.GetSettings(typeof(Growl)).Enable, + GrowlNotifyOnGrab = _configProvider.GrowlNotifyOnGrab, + GrowlNotifyOnDownload = _configProvider.GrowlNotifyOnDownload, + GrowlHost = _configProvider.GrowlHost, + GrowlPassword = _configProvider.GrowlPassword }; return View(model); @@ -469,6 +474,16 @@ namespace NzbDrone.Web.Controllers _configProvider.TwitterNotifyOnGrab = data.TwitterNotifyOnGrab; _configProvider.TwitterNotifyOnDownload = data.TwitterNotifyOnDownload; + //Growl + var growlSettings = _externalNotificationProvider.GetSettings(typeof(Growl)); + growlSettings.Enable = data.GrowlEnabled; + _externalNotificationProvider.SaveSettings(growlSettings); + + _configProvider.GrowlNotifyOnGrab = data.GrowlNotifyOnGrab; + _configProvider.GrowlNotifyOnDownload = data.GrowlNotifyOnDownload; + _configProvider.GrowlHost = data.GrowlHost; + _configProvider.GrowlPassword = data.GrowlPassword; + return GetSuccessResult(); } diff --git a/NzbDrone.Web/Models/NotificationSettingsModel.cs b/NzbDrone.Web/Models/NotificationSettingsModel.cs index 73afa0f32..3989d43c9 100644 --- a/NzbDrone.Web/Models/NotificationSettingsModel.cs +++ b/NzbDrone.Web/Models/NotificationSettingsModel.cs @@ -110,5 +110,26 @@ namespace NzbDrone.Web.Models [DisplayName("Notify on Download")] [Description("Send notification when episode is downloaded?")] public bool TwitterNotifyOnDownload { get; set; } + + //Growl + [DisplayName("Enabled")] + [Description("Enable notifications for Growl?")] + public bool GrowlEnabled { get; set; } + + [DisplayName("Notify on Grab")] + [Description("Send notification when episode is sent to SABnzbd?")] + public bool GrowlNotifyOnGrab { get; set; } + + [DisplayName("Notify on Download")] + [Description("Send notification when episode is downloaded?")] + public bool GrowlNotifyOnDownload { get; set; } + + [DisplayName("Host running Growl")] + [Description("Host or IP Address:Port")] + public string GrowlHost { get; set; } + + [DisplayName("Growl host Password")] + [Description("Password is required if Growl is running on another system")] + public string GrowlPassword { get; set; } } } \ No newline at end of file diff --git a/NzbDrone.Web/NzbDrone.Web.csproj b/NzbDrone.Web/NzbDrone.Web.csproj index 7919c0571..e496edc5f 100644 --- a/NzbDrone.Web/NzbDrone.Web.csproj +++ b/NzbDrone.Web/NzbDrone.Web.csproj @@ -945,6 +945,9 @@ + + +