mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-25 01:02:05 +00:00
New: Sonarr logo is optional for Pushalot notifications
This commit is contained in:
parent
129d7c9338
commit
86b748b9eb
2 changed files with 15 additions and 3 deletions
|
@ -30,7 +30,11 @@ public void SendNotification(String title, String message, PushalotSettings sett
|
||||||
var request = BuildRequest();
|
var request = BuildRequest();
|
||||||
|
|
||||||
request.AddParameter("Source", "Sonarr");
|
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("Title", title);
|
||||||
request.AddParameter("Body", message);
|
request.AddParameter("Body", message);
|
||||||
|
|
|
@ -16,13 +16,21 @@ public PushalotSettingsValidator()
|
||||||
|
|
||||||
public class PushalotSettings : IProviderConfig
|
public class PushalotSettings : IProviderConfig
|
||||||
{
|
{
|
||||||
|
public PushalotSettings()
|
||||||
|
{
|
||||||
|
Image = true;
|
||||||
|
}
|
||||||
|
|
||||||
private static readonly PushalotSettingsValidator Validator = new PushalotSettingsValidator();
|
private static readonly PushalotSettingsValidator Validator = new PushalotSettingsValidator();
|
||||||
|
|
||||||
[FieldDefinition(0, Label = "Authorization Token", HelpLink = "https://pushalot.com/manager/authorizations")]
|
[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))]
|
[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
|
public bool IsValid
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue