From c8ae6b02993e8e32910d64c85b5a84c9d255eb51 Mon Sep 17 00:00:00 2001 From: Qstick Date: Fri, 25 Nov 2022 20:14:47 -0600 Subject: [PATCH] Fixed: Custom Script Health Issue Level Co-Authored-By: Mark McDowall --- src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs b/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs index 94efe294f..ce6bab057 100644 --- a/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs +++ b/src/NzbDrone.Core/Notifications/CustomScript/CustomScript.cs @@ -9,6 +9,7 @@ using NzbDrone.Common.Extensions; using NzbDrone.Common.Processes; using NzbDrone.Common.Serializer; using NzbDrone.Core.Books; +using NzbDrone.Core.HealthCheck; using NzbDrone.Core.ThingiProvider; using NzbDrone.Core.Validation; @@ -205,7 +206,7 @@ namespace NzbDrone.Core.Notifications.CustomScript var environmentVariables = new StringDictionary(); environmentVariables.Add("Readarr_EventType", "HealthIssue"); - environmentVariables.Add("Readarr_Health_Issue_Level", nameof(healthCheck.Type)); + environmentVariables.Add("Readarr_Health_Issue_Level", Enum.GetName(typeof(HealthCheckResult), healthCheck.Type)); environmentVariables.Add("Readarr_Health_Issue_Message", healthCheck.Message); environmentVariables.Add("Readarr_Health_Issue_Type", healthCheck.Source.Name); environmentVariables.Add("Readarr_Health_Issue_Wiki", healthCheck.WikiUrl.ToString() ?? string.Empty);