From 86b748b9ebee43a38031f3dce5dd40947e6b42ac Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 1 Aug 2015 00:51:57 -0700 Subject: [PATCH] New: Sonarr logo is optional for Pushalot notifications --- .../Notifications/Pushalot/PushalotProxy.cs | 6 +++++- .../Notifications/Pushalot/PushalotSettings.cs | 12 ++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core/Notifications/Pushalot/PushalotProxy.cs b/src/NzbDrone.Core/Notifications/Pushalot/PushalotProxy.cs index 6688a95fd..6428de89f 100644 --- a/src/NzbDrone.Core/Notifications/Pushalot/PushalotProxy.cs +++ b/src/NzbDrone.Core/Notifications/Pushalot/PushalotProxy.cs @@ -30,7 +30,11 @@ namespace NzbDrone.Core.Notifications.Pushalot var request = BuildRequest(); request.AddParameter("Source", "Sonarr"); - request.AddParameter("Image", "https://raw.githubusercontent.com/Sonarr/Sonarr/develop/Logo/128.png"); + + if (settings.Image) + { + request.AddParameter("Image", "https://raw.githubusercontent.com/Sonarr/Sonarr/develop/Logo/128.png"); + } request.AddParameter("Title", title); request.AddParameter("Body", message); diff --git a/src/NzbDrone.Core/Notifications/Pushalot/PushalotSettings.cs b/src/NzbDrone.Core/Notifications/Pushalot/PushalotSettings.cs index 72560b249..ffa11acac 100644 --- a/src/NzbDrone.Core/Notifications/Pushalot/PushalotSettings.cs +++ b/src/NzbDrone.Core/Notifications/Pushalot/PushalotSettings.cs @@ -16,13 +16,21 @@ namespace NzbDrone.Core.Notifications.Pushalot public class PushalotSettings : IProviderConfig { + public PushalotSettings() + { + Image = true; + } + private static readonly PushalotSettingsValidator Validator = new PushalotSettingsValidator(); [FieldDefinition(0, Label = "Authorization Token", HelpLink = "https://pushalot.com/manager/authorizations")] - public String AuthToken { get; set; } + public string AuthToken { get; set; } [FieldDefinition(1, Label = "Priority", Type = FieldType.Select, SelectOptions = typeof(PushalotPriority))] - public Int32 Priority { get; set; } + public int Priority { get; set; } + + [FieldDefinition(2, Label = "Image", Type = FieldType.Checkbox, HelpText = "Include Sonarr logo with notifications")] + public bool Image { get; set; } public bool IsValid {