Browse Source

move troubleshoot button

pull/2615/head
Jason Dove 9 months ago
parent
commit
1451ef6d8e
No known key found for this signature in database
  1. 4
      CHANGELOG.md
  2. 22
      ErsatzTV/Pages/ScheduleItemsEditor.razor
  3. 19
      ErsatzTV/Pages/Schedules.razor

4
CHANGELOG.md

@ -29,8 +29,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -29,8 +29,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- There are two requirements for AviSynth Scripts to work:
- FFmpeg needs to be compiled with AviSynth support (not currently available in Docker)
- AviSynth itself needs to be installed
- Add `Troubleshoot` button to classic schedule items editor
- This generates JSON representing the entire schedule which can easily be shared when requested for troubleshooting
- Add `Troubleshoot` button to classic schedule list
- This generates JSON representing the entire schedule which can be shared when requested for troubleshooting
### Fixed
- Fix HLS Direct playback with Jellyfin 10.11

22
ErsatzTV/Pages/ScheduleItemsEditor.razor

@ -10,7 +10,6 @@ @@ -10,7 +10,6 @@
@using ErsatzTV.Core.Scheduling
@implements IDisposable
@inject NavigationManager NavigationManager
@inject IDialogService Dialog
@inject ILogger<ScheduleItemsEditor> Logger
@inject ISnackbar Snackbar
@inject IMediator Mediator
@ -58,16 +57,12 @@ @@ -58,16 +57,12 @@
<MudButton Class="ml-3" Variant="Variant.Filled" Color="Color.Default" OnClick="@AddScheduleItem" StartIcon="@Icons.Material.Filled.PlaylistAdd" Disabled="@(_schedule?.Items is null)">
Add Schedule Item
</MudButton>
<MudButton Class="ml-3" Variant="Variant.Filled" Color="Color.Default" OnClick="@Troubleshoot" StartIcon="@Icons.Material.Filled.Info" Disabled="@(_schedule?.Items is null)">
Troubleshoot
</MudButton>
</div>
<div style="align-items: center; display: flex; margin-left: auto;" class="d-md-none">
<div class="flex-grow-1"></div>
<MudMenu Icon="@Icons.Material.Filled.MoreVert">
<MudMenuItem Icon="@Icons.Material.Filled.Save" Label="Save Schedule Items" OnClick="@SaveChanges"/>
<MudMenuItem Icon="@Icons.Material.Filled.PlaylistAdd" Label="Add Schedule Item" OnClick="@AddScheduleItem"/>
<MudMenuItem Icon="@Icons.Material.Filled.Info" Label="Troubleshoot" OnClick="@Troubleshoot"/>
</MudMenu>
</div>
</div>
@ -971,23 +966,6 @@ @@ -971,23 +966,6 @@
return result;
}
private async Task Troubleshoot()
{
Option<ProgramScheduleViewModel> maybeSchedule = await Mediator.Send(new GetProgramScheduleById(Id), _cts.Token);
Option<IEnumerable<ProgramScheduleItemViewModel>> maybeResults = await Mediator.Send(new GetProgramScheduleItems(Id), _cts.Token);
foreach (ProgramScheduleViewModel schedule in maybeSchedule)
{
foreach (IEnumerable<ProgramScheduleItemViewModel> results in maybeResults)
{
var parameters = new DialogParameters { { "Schedule", schedule }, { "Items", results } };
var options = new DialogOptions { CloseButton = true, CloseOnEscapeKey = true, MaxWidth = MaxWidth.Medium, FullWidth = true };
IDialogReference dialog = await Dialog.ShowAsync<ScheduleItemsDialog>(_schedule.Name, parameters, options);
DialogResult _ = await dialog.Result;
}
}
}
private void AddScheduleItem()
{
var item = new ProgramScheduleItemEditViewModel

19
ErsatzTV/Pages/Schedules.razor

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
<ColGroup>
<MudHidden Breakpoint="Breakpoint.Xs">
<col/>
<col style="width: 240px;"/>
<col style="width: 300px;"/>
</MudHidden>
</ColGroup>
<ToolBarContent>
@ -58,6 +58,11 @@ @@ -58,6 +58,11 @@
OnClick="@(_ => CopySchedule(context))">
</MudIconButton>
</MudTooltip>
<MudTooltip Text="Troubleshoot">
<MudIconButton Icon="@Icons.Material.Filled.Info"
OnClick="@(_ => Troubleshoot(context))">
</MudIconButton>
</MudTooltip>
<MudTooltip Text="Delete Schedule">
<MudIconButton Icon="@Icons.Material.Filled.Delete"
OnClick="@(_ => DeleteSchedule(context))">
@ -213,5 +218,17 @@ @@ -213,5 +218,17 @@
_table.ReloadServerData();
}
private async Task Troubleshoot(ProgramScheduleViewModel schedule)
{
Option<IEnumerable<ProgramScheduleItemViewModel>> maybeResults = await Mediator.Send(new GetProgramScheduleItems(schedule.Id), _cts.Token);
foreach (IEnumerable<ProgramScheduleItemViewModel> results in maybeResults)
{
var parameters = new DialogParameters { { "Schedule", schedule }, { "Items", results } };
var options = new DialogOptions { CloseButton = true, CloseOnEscapeKey = true, MaxWidth = MaxWidth.Medium, FullWidth = true };
IDialogReference dialog = await Dialog.ShowAsync<ScheduleItemsDialog>(schedule.Name, parameters, options);
DialogResult _ = await dialog.Result;
}
}
private string SelectedRowClassFunc(ProgramScheduleViewModel element, int rowNumber) => _selectedSchedule != null && _selectedSchedule == element ? "selected" : string.Empty;
}

Loading…
Cancel
Save