Enhance GroupFilterMatcher to handle interstitial shows and update related tests and documentation
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:
@@ -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): источники
|
||||
|
||||
Reference in New Issue
Block a user