mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-04-24 22:07:32 -04:00
Rearrange params in Apprise
This commit is contained in:
parent
2015156061
commit
c8addc0d62
3 changed files with 7 additions and 9 deletions
|
@ -17,19 +17,19 @@ namespace NzbDrone.Core.Notifications.Apprise
|
|||
_proxy = proxy;
|
||||
}
|
||||
|
||||
public override void OnGrab(GrabMessage message)
|
||||
public override void OnGrab(GrabMessage grabMessage)
|
||||
{
|
||||
_proxy.SendNotification(Settings, RELEASE_GRABBED_TITLE_BRANDED, $"{message.Message}");
|
||||
_proxy.SendNotification(RELEASE_GRABBED_TITLE_BRANDED, grabMessage.Message, Settings);
|
||||
}
|
||||
|
||||
public override void OnHealthIssue(HealthCheck.HealthCheck healthCheck)
|
||||
{
|
||||
_proxy.SendNotification(Settings, HEALTH_ISSUE_TITLE_BRANDED, $"{healthCheck.Message}");
|
||||
_proxy.SendNotification(HEALTH_ISSUE_TITLE_BRANDED, healthCheck.Message, Settings);
|
||||
}
|
||||
|
||||
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
|
||||
{
|
||||
_proxy.SendNotification(Settings, APPLICATION_UPDATE_TITLE_BRANDED, $"{updateMessage.Message}");
|
||||
_proxy.SendNotification(APPLICATION_UPDATE_TITLE_BRANDED, updateMessage.Message, Settings);
|
||||
}
|
||||
|
||||
public override ValidationResult Test()
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
using Newtonsoft.Json;
|
||||
|
||||
namespace NzbDrone.Core.Notifications.Apprise
|
||||
{
|
||||
public class ApprisePayload
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace NzbDrone.Core.Notifications.Apprise
|
|||
{
|
||||
public interface IAppriseProxy
|
||||
{
|
||||
void SendNotification(AppriseSettings settings, string title, string message);
|
||||
void SendNotification(string title, string message, AppriseSettings settings);
|
||||
ValidationFailure Test(AppriseSettings settings);
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ namespace NzbDrone.Core.Notifications.Apprise
|
|||
_logger = logger;
|
||||
}
|
||||
|
||||
public void SendNotification(AppriseSettings settings, string title, string message)
|
||||
public void SendNotification(string title, string message, AppriseSettings settings)
|
||||
{
|
||||
var payload = new ApprisePayload
|
||||
{
|
||||
|
@ -85,7 +85,7 @@ namespace NzbDrone.Core.Notifications.Apprise
|
|||
|
||||
try
|
||||
{
|
||||
SendNotification(settings, title, body);
|
||||
SendNotification(title, body, settings);
|
||||
}
|
||||
catch (AppriseException ex) when (ex.InnerException is HttpException httpException)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue