Add bulk poster filling endpoint and enhance show deletion options
Introduced a new endpoint for bulk filling collection posters, allowing for automatic assignment of posters to collections without existing images. Updated the DeleteShowCommand to include an option for cutting shows from future airings, enhancing the deletion process. Refactored related components and API calls to support these features, ensuring a seamless user experience. Additionally, updated localization strings to reflect the new functionalities and adjusted tests to verify correct behavior.
This commit is contained in:
@@ -37,15 +37,17 @@ public class DeleteGuardsTests
|
||||
var fixture = new TestDb();
|
||||
var show = Show.Create("A", ShowKind.Series);
|
||||
var asset = MediaAsset.Register("a.mkv", ".mkv", MediaSource.Upload);
|
||||
var channel = Channel.Create("Первый", "first", T0);
|
||||
var future = DateTimeOffset.UtcNow.AddHours(1);
|
||||
|
||||
await using (var seed = fixture.New())
|
||||
{
|
||||
seed.Shows.Add(show);
|
||||
seed.MediaAssets.Add(asset);
|
||||
seed.Channels.Add(channel);
|
||||
seed.ScheduleEntries.Add(
|
||||
ScheduleEntry.Program(
|
||||
Guid.NewGuid(),
|
||||
channel.Id,
|
||||
asset.Id,
|
||||
future,
|
||||
future.AddMinutes(20),
|
||||
@@ -63,7 +65,9 @@ public class DeleteGuardsTests
|
||||
);
|
||||
|
||||
Assert.False(result.IsSuccess);
|
||||
Assert.Equal(ShowErrors.InFutureSchedule, result.Error);
|
||||
Assert.Equal(ShowErrors.InFutureSchedule(string.Empty).Code, result.Error.Code);
|
||||
// В тексте — канал и время: по ним видно, что именно пересобирать.
|
||||
Assert.Contains("Первый", result.Error.Message, StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user