yaml playout watermarks (#2149)

This commit is contained in:
Jason Dove
2025-07-14 03:25:20 +00:00
committed by GitHub
parent 39b107eb0f
commit 43e1cbd919
14 changed files with 146 additions and 5 deletions
@@ -44,4 +44,17 @@ public class ChannelRepository : IChannelRepository
.Include(c => c.Playouts)
.ToListAsync();
}
public async Task<Option<ChannelWatermark>> GetWatermarkByName(string name)
{
await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync();
List<ChannelWatermark> maybeWatermarks = await dbContext.ChannelWatermarks
.Where(cw => EF.Functions.Like(
EF.Functions.Collate(cw.Name, TvContext.CaseInsensitiveCollation),
$"%{name}%"))
.ToListAsync();
return maybeWatermarks.HeadOrNone();
}
}