Enhance channel management: add support for preferred weight multipliers and preferred hours in channel shows, update related data models and API endpoints, and implement validation for new properties. Refactor scheduling logic to utilize preferred hours for weight adjustments during show planning.
This commit is contained in:
@@ -12,9 +12,14 @@ public sealed record ChannelShowDto(
|
||||
BlockMode BlockMode,
|
||||
int BlockValue,
|
||||
bool IsEnabled,
|
||||
int NextEpisodeIndex
|
||||
int NextEpisodeIndex,
|
||||
int PreferredWeightMultiplier,
|
||||
IReadOnlyList<HourWindowDto> PreferredHours
|
||||
);
|
||||
|
||||
/// <summary>Окно предпочтительных часов [StartHour, EndHour) суток (UTC).</summary>
|
||||
public sealed record HourWindowDto(int StartHour, int EndHour);
|
||||
|
||||
public sealed record ChannelAdDto(Guid Id, Guid MediaAssetId, string? AssetName, int Position);
|
||||
|
||||
public sealed record OverrideShowDto(Guid ShowId, string ShowName, int Weight);
|
||||
@@ -31,10 +36,12 @@ public sealed record ProgrammingOverrideDto(
|
||||
public sealed record BumperSettingsDto(
|
||||
BumperFont Font,
|
||||
int MinIntervalMinutes,
|
||||
BumperSelection Selection
|
||||
BumperSelection Selection,
|
||||
double ShowChangeChance,
|
||||
double EpisodeChangeChance
|
||||
);
|
||||
|
||||
/// <summary>Подблок (текст-вариант): свой текст + правило показа поверх стиля/звука блока.</summary>
|
||||
/// <summary>Подблок (текст-вариант): свой текст + правило показа + вес поверх стиля/звука блока.</summary>
|
||||
public sealed record BumperTextVariantDto(
|
||||
Guid Id,
|
||||
int Position,
|
||||
@@ -44,7 +51,8 @@ public sealed record BumperTextVariantDto(
|
||||
string NextLabel,
|
||||
string Line1,
|
||||
string Line2,
|
||||
BumperTrigger Trigger
|
||||
BumperTrigger Trigger,
|
||||
int Weight
|
||||
);
|
||||
|
||||
/// <summary>Блок заставки: своё оформление + звук + подблоки. <see cref="AudioDurationSeconds"/> — длина звука (сек).</summary>
|
||||
|
||||
Reference in New Issue
Block a user