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
+20
View File
@@ -1,6 +1,7 @@
import { apiRequest } from '@/shared/api/client'
import type {
CreatedIdResponse,
EnrichShowsResult,
MetadataCandidate,
MissingEpisodesReport,
MissingSeasonsReport,
@@ -53,6 +54,25 @@ export function setShowOriginalName(id: string, originalName: string | null) {
})
}
/** Массовая разметка отмеченных шоу: жанры и рейтинг применяются независимо. */
export function bulkTagShows(body: {
showIds: string[]
genreIds?: string[]
replaceGenres?: boolean
audience?: ShowAudience | null
setAudience?: boolean
}) {
return apiRequest<{ updated: number }>('/admin/shows/bulk/tag', { method: 'POST', body })
}
/** Массовое обогащение: найти метаданные по названию и применить тем, у кого нет привязки. */
export function bulkEnrichShows(showIds: string[], provider: string) {
return apiRequest<EnrichShowsResult>('/admin/shows/bulk/enrich', {
method: 'POST',
body: { showIds, provider },
})
}
export function deleteShow(id: string) {
return apiRequest<void>(`/admin/shows/${id}`, { method: 'DELETE' })
}