1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-20 21:54:58 -04:00

New: OnApplicationUpdate Notifications

Closes #4810
Co-authored-by: Qstick <qstick@gmail.com>
This commit is contained in:
bakerboy448
2022-01-23 15:24:34 -06:00
committed by GitHub
parent cee17483d9
commit 71dba904a1
39 changed files with 501 additions and 194 deletions
@@ -198,6 +198,18 @@ namespace NzbDrone.Core.Notifications.CustomScript
ExecuteScript(environmentVariables);
}
public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage)
{
var environmentVariables = new StringDictionary();
environmentVariables.Add("Sonarr_EventType", "ApplicationUpdate");
environmentVariables.Add("Sonarr_Update_Message", updateMessage.Message);
environmentVariables.Add("Sonarr_Update_NewVersion", updateMessage.NewVersion.ToString());
environmentVariables.Add("Sonarr_Update_PreviousVersion", updateMessage.PreviousVersion.ToString());
ExecuteScript(environmentVariables);
}
public override ValidationResult Test()
{
var failures = new List<ValidationFailure>();