Enhance GroupFilterMatcher to handle interstitial shows and update related tests and documentation
ci / build-backend (push) Successful in 2m15s
ci / build-frontend (push) Successful in 54s
ci / tests (push) Successful in 2m7s
ci / sonar (push) Successful in 5m29s

Updated the GroupFilterMatcher to exclude interstitial shows by default unless explicitly specified in the filter. Added new tests to verify the behavior of the filter with and without interstitial shows. Updated localization strings to clarify the handling of show types in the user interface and documentation, ensuring users understand the distinction between films, series, and clips.
This commit is contained in:
Leonid Pershin
2026-07-29 23:32:30 +03:00
parent 281d081e6b
commit 6f74e66f0c
6 changed files with 56 additions and 1 deletions
@@ -1,5 +1,6 @@
using Microsoft.EntityFrameworkCore;
using TeleWave.Application.Common.Interfaces;
using TeleWave.Domain.Library;
using TeleWave.Domain.Programming;
namespace TeleWave.Application.Programming.Groups;
@@ -63,6 +64,11 @@ public sealed class GroupFilterMatcher(IAppDbContext dbContext)
if (filter.ShowKinds is { Count: > 0 } kinds)
shows = shows.Where(s => kinds.Contains(s.Kind));
else
// Ролики в набор сами не идут: они живут отдельной библиотекой (см. 6.7), и правило без
// указанного типа означает «кино и сериалы», а не «всё, что есть в базе». Группу роликов
// собирают, отметив тип «Ролик» явно.
shows = shows.Where(s => s.Kind != ShowKind.Interstitial);
// Рейтинги упорядочены по возрастанию строгости, поэтому «не строже» — обычное сравнение.
// Шоу без рейтинга остаются в выборке — ровно как в планировщике (ElementSelector): источники