From 11100a788bc9d945dd704c4fdda6db88086aa75b Mon Sep 17 00:00:00 2001 From: Jason Dove <1695733+jasongdove@users.noreply.github.com> Date: Mon, 4 Aug 2025 22:22:37 +0000 Subject: [PATCH] fix yaml guid validation (#2257) --- .../Channels/Commands/CreateChannelHandler.cs | 2 +- .../Channels/Commands/UpdateChannelHandler.cs | 2 +- ErsatzTV/Pages/ChannelEditor.razor | 4 ++-- ErsatzTV/Resources/yaml-playout-import.schema.json | 4 ++-- ErsatzTV/Resources/yaml-playout.schema.json | 4 ++-- ErsatzTV/Validators/ChannelEditViewModelValidator.cs | 9 +++++++++ 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ErsatzTV.Application/Channels/Commands/CreateChannelHandler.cs b/ErsatzTV.Application/Channels/Commands/CreateChannelHandler.cs index cbe08f267..01cd3ba04 100644 --- a/ErsatzTV.Application/Channels/Commands/CreateChannelHandler.cs +++ b/ErsatzTV.Application/Channels/Commands/CreateChannelHandler.cs @@ -91,7 +91,7 @@ public class CreateChannelHandler( TranscodeMode = request.TranscodeMode, IdleBehavior = request.IdleBehavior, IsEnabled = request.IsEnabled, - ShowInEpg = request.ShowInEpg + ShowInEpg = request.IsEnabled && request.ShowInEpg }; foreach (int id in watermarkId) diff --git a/ErsatzTV.Application/Channels/Commands/UpdateChannelHandler.cs b/ErsatzTV.Application/Channels/Commands/UpdateChannelHandler.cs index 55fbaf939..128e05a7b 100644 --- a/ErsatzTV.Application/Channels/Commands/UpdateChannelHandler.cs +++ b/ErsatzTV.Application/Channels/Commands/UpdateChannelHandler.cs @@ -46,7 +46,7 @@ public class UpdateChannelHandler( c.TranscodeMode = update.TranscodeMode; c.IdleBehavior = update.IdleBehavior; c.IsEnabled = update.IsEnabled; - c.ShowInEpg = update.ShowInEpg; + c.ShowInEpg = update.IsEnabled && update.ShowInEpg; c.Artwork ??= []; if (!string.IsNullOrWhiteSpace(update.Logo?.Path)) diff --git a/ErsatzTV/Pages/ChannelEditor.razor b/ErsatzTV/Pages/ChannelEditor.razor index f5050f6be..4655b9bb2 100644 --- a/ErsatzTV/Pages/ChannelEditor.razor +++ b/ErsatzTV/Pages/ChannelEditor.razor @@ -80,13 +80,13 @@