* add blocks, block groups * basic block and block item editing * add template groups and basic template editing (name) * add blocks to template calendar * edit playout templates * add calendar preview to playout templates * add basic block playout building * add mysql migration * update changelog
22 lines
718 B
C#
22 lines
718 B
C#
using ErsatzTV.Application.Channels;
|
|
using ErsatzTV.Application.Playouts;
|
|
using ErsatzTV.Application.ProgramSchedules;
|
|
|
|
namespace ErsatzTV.ViewModels;
|
|
|
|
public class PlayoutEditViewModel
|
|
{
|
|
public string Kind { get; set; }
|
|
public ChannelViewModel Channel { get; set; }
|
|
public ProgramScheduleViewModel ProgramSchedule { get; set; }
|
|
public string ExternalJsonFile { get; set; }
|
|
|
|
public CreatePlayout ToCreate() =>
|
|
Kind switch
|
|
{
|
|
PlayoutKind.ExternalJson => new CreateExternalJsonPlayout(Channel.Id, ExternalJsonFile),
|
|
PlayoutKind.Block => new CreateBlockPlayout(Channel.Id),
|
|
_ => new CreateFloodPlayout(Channel.Id, ProgramSchedule.Id)
|
|
};
|
|
}
|