fix watermark validation (#2301)

This commit is contained in:
Jason Dove
2025-08-11 18:55:45 +00:00
committed by GitHub
parent 91c4e8f575
commit 820c2a5ccc
4 changed files with 16 additions and 1 deletions
+2
View File
@@ -42,6 +42,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix channel playout mode `On Demand` for Block and YAML schedules
- Fix QSV transitions when remote streaming from a media server
- Fix green output when padding with VAAPI accel and i965 driver
- Fix watermark custom image validation
- Fix playback when using any watermarks that were saved with invalid state (no image)
### Changed
- Allow multiple watermarks in playback troubleshooting
@@ -190,6 +190,15 @@ public class FFmpegProcessService
Option<int>.None,
false);
case ChannelWatermarkImageSource.Custom:
// bad form validation makes this possible
if (string.IsNullOrWhiteSpace(watermark.Image))
{
_logger.LogWarning(
"Watermark {Name} has custom image configured with no image; ignoring",
watermark.Name);
break;
}
string customPath = _imageCache.GetPathForImage(
watermark.Image,
ArtworkKind.Watermark,
+4
View File
@@ -72,6 +72,10 @@
<MudElement HtmlTag="img" src="@($"artwork/watermarks/{_model.Image.UrlWithContentType}")" />
</div>
}
else
{
<MudTextField Disabled="true" For="@(() => _model.Image.Path)" />
}
</MudStack>
<MudStack Row="true" Breakpoint="Breakpoint.SmAndDown" Class="form-field-stack gap-md-8 mb-5">
<div class="d-flex">
@@ -12,7 +12,7 @@ public class WatermarkEditViewModelValidator : AbstractValidator<WatermarkEditVi
{
RuleFor(x => x.Name).NotEmpty();
RuleFor(x => x.Image)
RuleFor(x => x.Image.Path)
.NotEmpty()
.WithMessage("Watermark image is required!")
.When(vm => vm.ImageSource == ChannelWatermarkImageSource.Custom);