Add InterstitialGroups service and enhance SlotWriter and related components for interstitial handling
Introduced the InterstitialGroups service to manage interstitial group logic, preventing their inclusion in slots and fallback groups. Updated the SlotWriter class to utilize this service, ensuring proper validation during slot creation and updates. Enhanced error handling for interstitial groups in the ImportGridCommandHandler and UpdateTemplateCommandHandler, providing warnings instead of failures when interstitials are detected. Updated related tests to verify the correct behavior of these changes, ensuring robust handling of interstitials in the scheduling process.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using TeleWave.Application.Common.Interfaces;
|
||||
using TeleWave.Application.Programming.Groups;
|
||||
using TeleWave.Application.Programming.Templates;
|
||||
|
||||
namespace TeleWave.Application.Tests.Support;
|
||||
|
||||
@@ -14,4 +15,9 @@ internal static class GroupServices
|
||||
|
||||
public static GroupStatsService Stats(IAppDbContext db) =>
|
||||
new(db, new GroupElementResolver(db), Dynamic(db));
|
||||
|
||||
/// <summary>Писатель слотов: ему нужен ещё и признак «группа роликов» — их в слот не пускают.</summary>
|
||||
public static InterstitialGroups Interstitials(IAppDbContext db) => new(db);
|
||||
|
||||
public static SlotWriter Slots(IAppDbContext db) => new(db, Interstitials(db));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user