Implement BumperEndpoints and remove deprecated bumper-related functionality
Added new BumperEndpoints to the API for managing bumper templates and variants, enhancing the channel management capabilities. Removed outdated bumper-related commands and handlers from the application, streamlining the codebase and improving maintainability. Updated ChannelEndpoints to reflect these changes and ensure proper routing for the new endpoints.
This commit is contained in:
@@ -4,22 +4,18 @@ using TeleWave.Domain.Broadcast;
|
||||
namespace TeleWave.Application.Broadcast.Bumpers;
|
||||
|
||||
/// <summary>
|
||||
/// Чистая сборка <see cref="BumperRenderSpec"/> из уже разрешённых входов (пути к постеру/фону/звуку,
|
||||
/// названия шоу). Общая точка для фонового рендерера заставок расписания и превью в админке.
|
||||
/// Чистая сборка <see cref="BumperRenderSpec"/> из уже разрешённых входов (готовые строки, пути к
|
||||
/// постеру/фону/звуку). Общая точка для фонового рендерера заставок расписания и превью в админке.
|
||||
/// </summary>
|
||||
public static class BumperSpecFactory
|
||||
{
|
||||
public static BumperRenderSpec Build(
|
||||
BumperOptions bumper,
|
||||
BumperFont font,
|
||||
BumperTemplate template,
|
||||
BumperTextVariant variant,
|
||||
int alignedDurationSeconds,
|
||||
BumperSpecInputs inputs
|
||||
)
|
||||
{
|
||||
var free = variant.Kind == BumperTextKind.Free;
|
||||
return new BumperRenderSpec(
|
||||
) =>
|
||||
new(
|
||||
alignedDurationSeconds,
|
||||
bumper.Width,
|
||||
bumper.Height,
|
||||
@@ -27,17 +23,10 @@ public static class BumperSpecFactory
|
||||
template.BackgroundColor2,
|
||||
template.AccentColor,
|
||||
template.TextColor,
|
||||
font == BumperFont.Serif ? bumper.FontFileSerif : bumper.FontFileSans,
|
||||
free ? "" : variant.NowLabel,
|
||||
free ? "" : inputs.FromName,
|
||||
free ? "" : variant.NextLabel,
|
||||
free ? "" : inputs.ToName,
|
||||
template.Font == BumperFont.Serif ? bumper.FontFileSerif : bumper.FontFileSans,
|
||||
inputs.Lines,
|
||||
inputs.BackgroundAbsolutePath,
|
||||
inputs.AudioPath,
|
||||
inputs.PosterAbsolutePath,
|
||||
free,
|
||||
variant.Line1,
|
||||
variant.Line2
|
||||
inputs.PosterAbsolutePath
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user