allow external channel logo urls (#2067)

This commit is contained in:
Jason Dove
2025-06-24 00:43:24 +00:00
committed by GitHub
parent 20d2fe71cd
commit f71b6527c0
12 changed files with 113 additions and 39 deletions
@@ -1,5 +1,4 @@
using System.Globalization;
using ErsatzTV.Core.Domain;
using ErsatzTV.Core.Domain;
using ErsatzTV.ViewModels;
using FluentValidation;
@@ -15,5 +14,14 @@ public class ChannelEditViewModelValidator : AbstractValidator<ChannelEditViewMo
RuleFor(x => x.Name).NotEmpty();
RuleFor(x => x.Group).NotEmpty();
RuleFor(x => x.FFmpegProfileId).GreaterThan(0);
When(
x => !string.IsNullOrWhiteSpace(x.ExternalLogoUrl),
() =>
{
RuleFor(x => x.ExternalLogoUrl)
.Must(Artwork.IsExternalUrl)
.WithMessage("External logo url is invalid");
});
}
}