diff --git a/ErsatzTV/Pages/Playouts.razor b/ErsatzTV/Pages/Playouts.razor index b5af3bcff..8f2320177 100644 --- a/ErsatzTV/Pages/Playouts.razor +++ b/ErsatzTV/Pages/Playouts.razor @@ -14,7 +14,7 @@ - + Id @@ -29,7 +29,18 @@ @context.ProgramSchedule.Name @* @context.ProgramSchedulePlayoutType *@ - +
+ + + + + + + + +
@@ -63,12 +74,16 @@ @code { private List _playouts; private List _selectedPlayoutItems; + private int? _selectedPlayoutId; protected override Task OnParametersSetAsync() => LoadAllPlayouts(); - private async Task PlayoutSelected(PlayoutViewModel playout) => + private async Task PlayoutSelected(PlayoutViewModel playout) + { + _selectedPlayoutId = playout.Id; _selectedPlayoutItems = await Mediator.Send(new GetPlayoutItemsById(playout.Id)); + } private async Task DeletePlayout(PlayoutViewModel playout) { @@ -84,6 +99,16 @@ } } + private async Task RebuildPlayout(PlayoutViewModel playout) + { + await Mediator.Send(new BuildPlayout(playout.Id, true)); + await LoadAllPlayouts(); + if (_selectedPlayoutId == playout.Id) + { + await PlayoutSelected(playout); + } + } + private async Task LoadAllPlayouts() => _playouts = await Mediator.Send(new GetAllPlayouts()); diff --git a/ErsatzTV/Pages/Schedules.razor b/ErsatzTV/Pages/Schedules.razor index 157b55e81..3c767ee88 100644 --- a/ErsatzTV/Pages/Schedules.razor +++ b/ErsatzTV/Pages/Schedules.razor @@ -14,7 +14,7 @@ - + Id @@ -27,17 +27,23 @@ @context.Name @context.MediaCollectionPlaybackOrder - - - Edit Properties - - - Edit Schedule Items - - - Delete - - +
+ + + + + + + + + + + + +