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:
@@ -8,7 +8,11 @@ import { Input } from '@/shared/ui/input'
|
||||
import { Label } from '@/shared/ui/label'
|
||||
|
||||
const ELEMENT_KINDS: GroupElementKind[] = ['Show', 'Collection']
|
||||
const SHOW_KINDS: ShowKind[] = ['Series', 'Single']
|
||||
/**
|
||||
* Ролики в списке есть намеренно: группа рекламы собирается тем же правилом, что и группа кино.
|
||||
* Сами по себе они в набор не попадают — сервер отдаёт их, только если тип отмечен явно.
|
||||
*/
|
||||
const SHOW_KINDS: ShowKind[] = ['Series', 'Single', 'Interstitial']
|
||||
|
||||
/** Конструктор правила набора. Правило не применяется само — оно только ищет кандидатов. */
|
||||
export function GroupFilterPanel({
|
||||
@@ -63,6 +67,7 @@ export function GroupFilterPanel({
|
||||
</label>
|
||||
))}
|
||||
</div>
|
||||
<p className="text-xs text-muted-foreground">{t('admin.groups.filter.showKindsHint')}</p>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-col gap-1.5">
|
||||
|
||||
@@ -147,6 +147,8 @@ export const en = {
|
||||
hint: 'In an explicit list the rule only finds candidates; in a rule-based group it is the composition.',
|
||||
elementKinds: 'What to search',
|
||||
showKinds: 'Show type',
|
||||
showKindsHint:
|
||||
'Unchecked means films and series. Clips live in their own library and join the selection only when checked explicitly.',
|
||||
genres: 'Genres',
|
||||
genresHint: 'Any of the checked ones.',
|
||||
maxAudience: 'No stricter than',
|
||||
|
||||
@@ -147,6 +147,8 @@ export const ru = {
|
||||
hint: 'В явном списке правило только ищет кандидатов; в группе «по правилу» оно и есть состав.',
|
||||
elementKinds: 'Что искать',
|
||||
showKinds: 'Тип шоу',
|
||||
showKindsHint:
|
||||
'Не отмечено — кино и сериалы. Ролики живут отдельной библиотекой и попадают в набор, только если отметить их явно.',
|
||||
genres: 'Жанры',
|
||||
genresHint: 'Любой из отмеченных.',
|
||||
maxAudience: 'Возраст не строже',
|
||||
|
||||
Reference in New Issue
Block a user