Adds per-playout REST for classic-playout alternate schedules and
block-playout templates, plus the default-deco read-side deferred from S3:
- GET/PUT /api/playouts/{id}/alternate-schedules (Classic only; 422 otherwise)
- GET/PUT /api/playouts/{id}/templates (Block only; 422 otherwise)
- PlayoutResponseModel gains decoId/decoName (GetPlayoutById includes Deco)
PUT assigns Index from array order (top = highest priority, last = catch-all
default), mirroring the Blazor editors. Alternate-schedule PUT requires a
non-empty list and existing ProgramScheduleIds; template PUT requires existing
TemplateIds and any supplied DecoTemplateId. Regenerates the OpenAPI spec.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
44 lines
1.1 KiB
C#
44 lines
1.1 KiB
C#
#nullable enable
|
|
using ErsatzTV.Core.Domain;
|
|
|
|
namespace ErsatzTV.Core.Api.Playouts;
|
|
|
|
public record PlayoutResponseModel(
|
|
int Id,
|
|
PlayoutScheduleKind ScheduleKind,
|
|
string ChannelName,
|
|
string ChannelNumber,
|
|
ChannelPlayoutMode PlayoutMode,
|
|
string ScheduleName,
|
|
string? ScheduleFile,
|
|
TimeSpan? DailyRebuildTime,
|
|
PlayoutBuildStatusResponseModel? BuildStatus,
|
|
int? DecoId,
|
|
string? DecoName)
|
|
{
|
|
public static PlayoutResponseModel From(
|
|
int id,
|
|
PlayoutScheduleKind scheduleKind,
|
|
string channelName,
|
|
string channelNumber,
|
|
ChannelPlayoutMode playoutMode,
|
|
string scheduleName,
|
|
string? scheduleFile,
|
|
TimeSpan? dailyRebuildTime,
|
|
PlayoutBuildStatusResponseModel? buildStatus,
|
|
int? decoId,
|
|
string? decoName) =>
|
|
new(
|
|
id,
|
|
scheduleKind,
|
|
channelName,
|
|
channelNumber,
|
|
playoutMode,
|
|
scheduleName,
|
|
scheduleFile,
|
|
dailyRebuildTime,
|
|
buildStatus,
|
|
decoId,
|
|
decoName);
|
|
}
|