diff --git a/Jellyfin.Plugin.Webhook/Destinations/Discord/DiscordClient.cs b/Jellyfin.Plugin.Webhook/Destinations/Discord/DiscordClient.cs index 27db71c..43a8fb9 100644 --- a/Jellyfin.Plugin.Webhook/Destinations/Discord/DiscordClient.cs +++ b/Jellyfin.Plugin.Webhook/Destinations/Discord/DiscordClient.cs @@ -80,7 +80,7 @@ namespace Jellyfin.Plugin.Webhook.Destinations.Discord private static int FormatColorCode(string hexCode) { - return int.Parse(hexCode.Substring(1, 6), NumberStyles.HexNumber, CultureInfo.InvariantCulture); + return int.Parse(hexCode[1..6], NumberStyles.HexNumber, CultureInfo.InvariantCulture); } private static string GetMentionType(DiscordMentionType mentionType) diff --git a/Jellyfin.Plugin.Webhook/Helpers/HandlebarsFunctionHelpers.cs b/Jellyfin.Plugin.Webhook/Helpers/HandlebarsFunctionHelpers.cs index 6515029..bd41a0f 100644 --- a/Jellyfin.Plugin.Webhook/Helpers/HandlebarsFunctionHelpers.cs +++ b/Jellyfin.Plugin.Webhook/Helpers/HandlebarsFunctionHelpers.cs @@ -1,4 +1,5 @@ using System; +using System.Globalization; using HandlebarsDotNet; namespace Jellyfin.Plugin.Webhook.Helpers @@ -82,7 +83,7 @@ namespace Jellyfin.Plugin.Webhook.Helpers // UndefinedBindingResult means the parameter was a part of the provided dataset. return input is UndefinedBindingResult or null ? null - : Convert.ToString(input); + : Convert.ToString(input, CultureInfo.InvariantCulture); } } } diff --git a/jellyfin.ruleset b/jellyfin.ruleset index a1a75e9..8af791c 100644 --- a/jellyfin.ruleset +++ b/jellyfin.ruleset @@ -1,82 +1,108 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + +