diff --git a/ErsatzTV.Core/Graphics/ImageGraphicsElement.cs b/ErsatzTV.Core/Graphics/ImageGraphicsElement.cs index 6f716d2a..75bc7989 100644 --- a/ErsatzTV.Core/Graphics/ImageGraphicsElement.cs +++ b/ErsatzTV.Core/Graphics/ImageGraphicsElement.cs @@ -8,7 +8,8 @@ public class ImageGraphicsElement { public string Image { get; set; } - public int? Opacity { get; set; } + [YamlMember(Alias = "opacity_percent", ApplyNamingConventions = false)] + public int? OpacityPercent { get; set; } [YamlMember(Alias = "opacity_expression", ApplyNamingConventions = false)] public string OpacityExpression { get; set; } diff --git a/ErsatzTV.Core/Graphics/TextGraphicsElement.cs b/ErsatzTV.Core/Graphics/TextGraphicsElement.cs index a5de5323..d62d54bf 100644 --- a/ErsatzTV.Core/Graphics/TextGraphicsElement.cs +++ b/ErsatzTV.Core/Graphics/TextGraphicsElement.cs @@ -6,7 +6,8 @@ namespace ErsatzTV.Core.Graphics; public class TextGraphicsElement { - public int? Opacity { get; set; } + [YamlMember(Alias = "opacity_percent", ApplyNamingConventions = false)] + public int? OpacityPercent { get; set; } [YamlMember(Alias = "opacity_expression", ApplyNamingConventions = false)] public string OpacityExpression { get; set; } diff --git a/ErsatzTV.Infrastructure/Streaming/ImageElement.cs b/ErsatzTV.Infrastructure/Streaming/ImageElement.cs index 02a1be73..197f327e 100644 --- a/ErsatzTV.Infrastructure/Streaming/ImageElement.cs +++ b/ErsatzTV.Infrastructure/Streaming/ImageElement.cs @@ -40,7 +40,7 @@ public class ImageElement(ImageGraphicsElement imageGraphicsElement, ILogger log } else { - _opacity = (imageGraphicsElement.Opacity ?? 100) / 100.0f; + _opacity = (imageGraphicsElement.OpacityPercent ?? 100) / 100.0f; } ZIndex = imageGraphicsElement.ZIndex ?? 0; diff --git a/ErsatzTV.Infrastructure/Streaming/TextElement.cs b/ErsatzTV.Infrastructure/Streaming/TextElement.cs index 81c2cfd0..89bef145 100644 --- a/ErsatzTV.Infrastructure/Streaming/TextElement.cs +++ b/ErsatzTV.Infrastructure/Streaming/TextElement.cs @@ -40,7 +40,7 @@ public class TextElement(TextGraphicsElement textElement, Dictionary