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 @@
Is Enabled
-
+
Show In EPG
-
+
diff --git a/ErsatzTV/Resources/yaml-playout-import.schema.json b/ErsatzTV/Resources/yaml-playout-import.schema.json
index 9a4f1b922..65527a082 100644
--- a/ErsatzTV/Resources/yaml-playout-import.schema.json
+++ b/ErsatzTV/Resources/yaml-playout-import.schema.json
@@ -80,7 +80,7 @@
"type": "object",
"properties": {
"source": { "type": "string" },
- "value": { "type": "string" }
+ "value": { "type": ["integer", "string"] }
},
"required": [ "source", "value" ],
"additionalProperties": false
@@ -154,7 +154,7 @@
"type": "object",
"properties": {
"source": { "type": "string" },
- "value": { "type": "string" }
+ "value": { "type": ["integer", "string"] }
},
"required": [ "source", "value" ],
"additionalProperties": false
diff --git a/ErsatzTV/Resources/yaml-playout.schema.json b/ErsatzTV/Resources/yaml-playout.schema.json
index 82a0fee68..c169afb6c 100644
--- a/ErsatzTV/Resources/yaml-playout.schema.json
+++ b/ErsatzTV/Resources/yaml-playout.schema.json
@@ -124,7 +124,7 @@
"type": "object",
"properties": {
"source": { "type": "string" },
- "value": { "type": "string" }
+ "value": { "type": ["integer", "string"] }
},
"required": [ "source", "value" ],
"additionalProperties": false
@@ -198,7 +198,7 @@
"type": "object",
"properties": {
"source": { "type": "string" },
- "value": { "type": "string" }
+ "value": { "type": ["integer", "string"] }
},
"required": [ "source", "value" ],
"additionalProperties": false
diff --git a/ErsatzTV/Validators/ChannelEditViewModelValidator.cs b/ErsatzTV/Validators/ChannelEditViewModelValidator.cs
index b9125d1ca..42a2e9ad7 100644
--- a/ErsatzTV/Validators/ChannelEditViewModelValidator.cs
+++ b/ErsatzTV/Validators/ChannelEditViewModelValidator.cs
@@ -24,6 +24,15 @@ public class ChannelEditViewModelValidator : AbstractValidator x.IsEnabled == false,
+ () =>
+ {
+ RuleFor(x => x.ShowInEpg)
+ .Must(x => x == false)
+ .WithMessage("Disabled channels cannot be shown in EPG");
+ });
}
public Func