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
@@ -55,13 +55,20 @@ public class ValidateTemplateTests
)
);
/// <summary>Наполняет группу позициями: проверке важно их число, а не что за ними стоит.</summary>
private static void FillGroup(Group group, int count)
{
for (var i = 0; i < count; i++)
group.AddElement(GroupElementKind.Show, Guid.NewGuid());
}
private static async Task<IReadOnlyList<TemplateIssueDto>> ValidateAsync(
TestDb fixture,
Guid channelId
)
{
await using var db = fixture.New();
var result = await new ValidateTemplateQueryHandler(db).Handle(
var result = await new ValidateTemplateQueryHandler(db, GroupServices.Dynamic(db)).Handle(
new ValidateTemplateQuery(channelId),
CancellationToken.None
);
@@ -75,7 +82,7 @@ public class ValidateTemplateTests
var fixture = new TestDb();
await using var db = fixture.New();
var result = await new ValidateTemplateQueryHandler(db).Handle(
var result = await new ValidateTemplateQueryHandler(db, GroupServices.Dynamic(db)).Handle(
new ValidateTemplateQuery(Guid.NewGuid()),
CancellationToken.None
);
@@ -95,7 +102,7 @@ public class ValidateTemplateTests
}
await using var db = fixture.New();
var result = await new ValidateTemplateQueryHandler(db).Handle(
var result = await new ValidateTemplateQueryHandler(db, GroupServices.Dynamic(db)).Handle(
new ValidateTemplateQuery(channel.Id),
CancellationToken.None
);
@@ -177,7 +184,9 @@ public class ValidateTemplateTests
var fixture = new TestDb();
var channel = Channel.Create("Первый", "one", T0);
var group = Group.Create("Маленькая");
group.UpdateStats(3, 3, TimeSpan.FromHours(3), T0);
// Позиции настоящие: проверка считает состав, а не кэш статистики, — у динамической группы
// кэш отстаёт от библиотеки, и полагаться на него нельзя.
FillGroup(group, 3);
var template = ScheduleTemplate.Create(channel.Id, "Сетка");
var slot = FullDaySlot(template.Background!, group.Id, channel.DayStartTime);
@@ -212,7 +221,7 @@ public class ValidateTemplateTests
var fixture = new TestDb();
var channel = Channel.Create("Первый", "one", T0);
var group = Group.Create("Кино");
group.UpdateStats(50, 50, TimeSpan.FromHours(50), T0);
FillGroup(group, 50);
var template = ScheduleTemplate.Create(channel.Id, "Сетка");
FullDaySlot(template.Background!, group.Id, channel.DayStartTime);
@@ -255,7 +264,7 @@ public class ValidateTemplateTests
var group = Group.Create("Вечернее");
group.AddElement(GroupElementKind.Show, mild.Id);
group.AddElement(GroupElementKind.Collection, collection.Id);
group.UpdateStats(2, 2, TimeSpan.FromHours(2), T0);
FillGroup(group, 2);
var template = ScheduleTemplate.Create(channel.Id, "Сетка");
var slot = FullDaySlot(template.Background!, group.Id, channel.DayStartTime);