Implement bulk tagging and enriching of shows with new API endpoints and frontend integration
ci / build-backend (push) Successful in 2m4s
ci / build-frontend (push) Successful in 53s
ci / tests (push) Successful in 1m59s
ci / sonar (push) Successful in 6m6s

Added new API endpoints for bulk tagging and enriching shows, allowing for mass updates of genres and audience ratings. Implemented backend logic to handle bulk operations and updated the Dependency Injection configuration to include necessary services. Enhanced the frontend with new components for selecting shows and applying bulk actions, improving the user experience for managing multiple shows simultaneously. Localization updates were made to support these new features in both English and Russian.
This commit is contained in:
Leonid Pershin
2026-07-27 05:18:18 +03:00
parent 91af589547
commit 1a7f73a5bd
25 changed files with 1011 additions and 107 deletions
+7
View File
@@ -234,6 +234,7 @@ export type GroupFilter = {
showKinds?: ShowKind[] | null
genreIds?: string[] | null
maxAudience?: ShowAudience | null
minAudience?: ShowAudience | null
yearMin?: number | null
yearMax?: number | null
unitMinutesMin?: number | null
@@ -253,6 +254,12 @@ export type GroupSummaryDto = {
createdAt: string
}
/** Итог массового обогащения метаданными: что применилось и что пропущено с причиной. */
export type EnrichShowsResult = {
applied: number
skipped: { showId: string; showName: string; reason: string }[]
}
/** Откуда группа берёт состав: явный список либо вычисление правилом. */
export type GroupMode = 'Static' | 'Dynamic'
+19 -1
View File
@@ -134,12 +134,15 @@ export const en = {
},
filter: {
title: 'Selection rule',
hint: 'The rule only finds candidates — the group composition stays an explicit list.',
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',
genres: 'Genres',
genresHint: 'Any of the checked ones.',
maxAudience: 'No stricter than',
minAudience: 'No softer than',
minAudienceHint:
'For late-night slots. Unlike the upper bound, unrated shows are excluded — otherwise unrated cartoons would slip into the adult group.',
audienceHint:
'Ratings are ordered by strictness: G → PG → PG-13 → R → NC-17. Unrated shows stay in the selection.',
year: 'Year',
@@ -346,6 +349,21 @@ export const en = {
genre: 'Genre',
allGenres: 'All genres',
otherGenres: 'Other genres',
bulk: {
selected: 'Selected: {{count}}',
selectPage: 'Select all on this page',
noGenre: 'Keep genres',
keepAudience: 'Keep rating',
apply: 'Apply',
tagged: 'Shows updated: {{count}}',
clear: 'Clear selection',
enrich: 'Metadata from {{provider}}',
enrichHint:
'Search by name and apply — only for shows with no source linked. Ambiguous matches are skipped.',
enriching: 'Searching…',
enriched: 'Metadata applied: {{count}}',
moreSkipped: 'Skipped as well: {{count}}',
},
genresEmpty: 'No genres set',
genresEdit: 'Genres',
genresHint:
+19 -1
View File
@@ -134,12 +134,15 @@ export const ru = {
},
filter: {
title: 'Правило набора',
hint: 'Правило только ищет кандидатов — состав группы остаётся явным списком.',
hint: 'В явном списке правило только ищет кандидатов; в группе «по правилу» оно и есть состав.',
elementKinds: 'Что искать',
showKinds: 'Тип шоу',
genres: 'Жанры',
genresHint: 'Любой из отмеченных.',
maxAudience: 'Возраст не строже',
minAudience: 'Возраст не мягче',
minAudienceHint:
'Для ночных слотов. В отличие от верхней границы, шоу без рейтинга сюда не попадают — иначе в «взрослое» просочились бы непроставленные мультики.',
audienceHint:
'Рейтинги упорядочены по строгости: G → PG → PG-13 → R → NC-17. Шоу без рейтинга остаются в выборке.',
year: 'Год',
@@ -347,6 +350,21 @@ export const ru = {
genre: 'Жанр',
allGenres: 'Все жанры',
otherGenres: 'Остальные жанры',
bulk: {
selected: 'Отмечено: {{count}}',
selectPage: 'Отметить все на странице',
noGenre: 'Жанр не менять',
keepAudience: 'Рейтинг не менять',
apply: 'Применить',
tagged: 'Обновлено шоу: {{count}}',
clear: 'Снять выбор',
enrich: 'Метаданные из {{provider}}',
enrichHint:
'Найти по названию и применить — только тем, у кого источник ещё не привязан. Неоднозначные совпадения пропускаются.',
enriching: 'Ищем…',
enriched: 'Метаданные применены: {{count}}',
moreSkipped: 'Ещё пропущено: {{count}}',
},
genresEmpty: 'Жанры не проставлены',
genresEdit: 'Жанры',
genresHint: