Browse Source

more settings updates (#2111)

* update logging settings layout

* update hdhomerun settings layout

* update scanner settings layout

* update playout settings layout

* update xmltv settings layout

* update changelog
pull/2112/head
Jason Dove 1 month ago committed by GitHub
parent
commit
93afcd2f57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      CHANGELOG.md
  2. 46
      ErsatzTV/Pages/Settings/HDHRSettings.razor
  3. 79
      ErsatzTV/Pages/Settings/LoggingSettings.razor
  4. 56
      ErsatzTV/Pages/Settings/PlayoutSettings.razor
  5. 41
      ErsatzTV/Pages/Settings/ScannerSettings.razor
  6. 57
      ErsatzTV/Pages/Settings/XMLTVSettings.razor

2
CHANGELOG.md

@ -72,7 +72,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -72,7 +72,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Remove some limits on multithreading that are no longer needed with latest ffmpeg
- Mixed transcoding (software decode, hardware filters/encode) can now use multiple decode threads
- Split main `Settings` page into multiple pages
- Rework `FFmpeg Settings` layout to be less cramped and to work better on mobile
- Update layout on all new settings pages to be less cramped and to work better on mobile
### Fixed
- Fix QSV acceleration in docker with older Intel devices

46
ErsatzTV/Pages/Settings/HDHRSettings.razor

@ -1,37 +1,41 @@ @@ -1,37 +1,41 @@
@page "/settings/hdhr"
@using ErsatzTV.Annotations
@using ErsatzTV.Application.HDHR
@implements IDisposable
@inject IMediator Mediator
@inject ISnackbar Snackbar
@inject ILogger<HDHRSettings> Logger
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="pt-8">
<MudCard Style="width: 350px">
<MudCardHeader>
<CardHeaderContent>
<MudText Typo="Typo.h6">HDHomeRun Settings</MudText>
</CardHeaderContent>
</MudCardHeader>
<MudCardContent>
<MudTextField T="Guid" Label="UUID" @bind-Value="_uuid" ReadOnly="true" Disabled="true"/>
</MudCardContent>
<MudCardContent>
<MudForm @bind-IsValid="@_hdhrSuccess">
<MudTextField T="int" Label="Tuner Count" @bind-Value="_tunerCount" Validation="@(new Func<int, string>(ValidateTunerCount))" Required="true" RequiredError="Tuner count is required!"/>
</MudForm>
</MudCardContent>
<MudCardActions>
<MudButton Variant="Variant.Filled" Color="Color.Primary" Disabled="@(!_hdhrSuccess)" OnClick="@(_ => SaveHDHRSettings())">Save Settings</MudButton>
</MudCardActions>
</MudCard>
</MudContainer>
<MudForm @bind-IsValid="@_hdhrSuccess" Style="max-height: 100%">
<MudPaper Square="true" Style="display: flex; height: 64px; min-height: 64px; width: 100%; z-index: 100; align-items: center">
<MudButton Variant="Variant.Filled" Color="Color.Primary" Disabled="@(!_hdhrSuccess)" OnClick="@(_ => SaveHDHRSettings())" Class="ml-8" StartIcon="@Icons.Material.Filled.Save">Save Settings</MudButton>
</MudPaper>
<div class="d-flex flex-column" style="height: 100vh; overflow-x: auto">
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="pt-8">
<MudText Typo="Typo.h5" Class="mb-2">HDHomeRun</MudText>
<MudDivider Class="mb-6" />
<MudStack Row="true" Breakpoint="Breakpoint.SmAndDown" Class="form-field-stack gap-md-8 mb-5">
<div class="d-flex justify-md-end">
<MudText>UUID</MudText>
</div>
<MudTextField @bind-Value="_uuid" Disabled="true" />
</MudStack>
<MudStack Row="true" Breakpoint="Breakpoint.SmAndDown" Class="form-field-stack gap-md-8 mb-5">
<div class="d-flex justify-md-end">
<MudText>Tuner Count</MudText>
</div>
<MudTextField @bind-Value="_tunerCount" Validation="@(new Func<int, string>(ValidateTunerCount))" Required="true" RequiredError="Tuner count is required!" />
</MudStack>
</MudContainer>
</div>
</MudForm>
@code {
private readonly CancellationTokenSource _cts = new();
private bool _hdhrSuccess;
private int _tunerCount;
private Guid _uuid;
[UsedImplicitly] private Guid _uuid;
public void Dispose()
{

79
ErsatzTV/Pages/Settings/LoggingSettings.razor

@ -6,69 +6,72 @@ @@ -6,69 +6,72 @@
@inject ISnackbar Snackbar
@inject ILogger<LoggingSettings> Logger
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="pt-8">
<MudCard Style="width: 350px">
<MudCardHeader>
<CardHeaderContent>
<MudText Typo="Typo.h6">Logging Settings</MudText>
</CardHeaderContent>
</MudCardHeader>
<MudCardContent>
<MudForm>
<MudSelect Class="mt-3"
Label="Default Minimum Log Level"
@bind-Value="_loggingSettings.DefaultMinimumLogLevel"
For="@(() => _loggingSettings.DefaultMinimumLogLevel)">
<MudForm Style="max-height: 100%">
<MudPaper Square="true" Style="display: flex; height: 64px; min-height: 64px; width: 100%; z-index: 100; align-items: center">
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="@(_ => SaveLoggingSettings())" Class="ml-8" StartIcon="@Icons.Material.Filled.Save">Save Settings</MudButton>
</MudPaper>
<div class="d-flex flex-column" style="height: 100vh; overflow-x: auto">
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="pt-8">
<MudText Typo="Typo.h5" Class="mb-2">Logging</MudText>
<MudDivider Class="mb-6" />
<MudStack Row="true" Breakpoint="Breakpoint.SmAndDown" Class="form-field-stack gap-md-8 mb-5">
<div class="d-flex justify-md-end">
<MudText>Default Minimum Log Level</MudText>
</div>
<MudSelect @bind-Value="_loggingSettings.DefaultMinimumLogLevel">
<MudSelectItem Value="@LogEventLevel.Debug">Debug</MudSelectItem>
<MudSelectItem Value="@LogEventLevel.Information">Information</MudSelectItem>
<MudSelectItem Value="@LogEventLevel.Warning">Warning</MudSelectItem>
<MudSelectItem Value="@LogEventLevel.Error">Error</MudSelectItem>
</MudSelect>
<MudSelect Class="mt-3"
Label="Scanning Minimum Log Level"
@bind-Value="_loggingSettings.ScanningMinimumLogLevel"
For="@(() => _loggingSettings.ScanningMinimumLogLevel)">
</MudStack>
<MudStack Row="true" Breakpoint="Breakpoint.SmAndDown" Class="form-field-stack gap-md-8 mb-5">
<div class="d-flex justify-md-end">
<MudText>Scanning Minimum Log Level</MudText>
</div>
<MudSelect @bind-Value="_loggingSettings.ScanningMinimumLogLevel">
<MudSelectItem Value="@LogEventLevel.Debug">Debug</MudSelectItem>
<MudSelectItem Value="@LogEventLevel.Information">Information</MudSelectItem>
<MudSelectItem Value="@LogEventLevel.Warning">Warning</MudSelectItem>
<MudSelectItem Value="@LogEventLevel.Error">Error</MudSelectItem>
</MudSelect>
<MudSelect Class="mt-3"
Label="Scheduling Minimum Log Level"
@bind-Value="_loggingSettings.SchedulingMinimumLogLevel"
For="@(() => _loggingSettings.SchedulingMinimumLogLevel)">
</MudStack>
<MudStack Row="true" Breakpoint="Breakpoint.SmAndDown" Class="form-field-stack gap-md-8 mb-5">
<div class="d-flex justify-md-end">
<MudText>Scheduling Minimum Log Level</MudText>
</div>
<MudSelect @bind-Value="_loggingSettings.SchedulingMinimumLogLevel">
<MudSelectItem Value="@LogEventLevel.Debug">Debug</MudSelectItem>
<MudSelectItem Value="@LogEventLevel.Information">Information</MudSelectItem>
<MudSelectItem Value="@LogEventLevel.Warning">Warning</MudSelectItem>
<MudSelectItem Value="@LogEventLevel.Error">Error</MudSelectItem>
</MudSelect>
<MudSelect Class="mt-3"
Label="Streaming Minimum Log Level"
@bind-Value="_loggingSettings.StreamingMinimumLogLevel"
For="@(() => _loggingSettings.StreamingMinimumLogLevel)">
</MudStack>
<MudStack Row="true" Breakpoint="Breakpoint.SmAndDown" Class="form-field-stack gap-md-8 mb-5">
<div class="d-flex justify-md-end">
<MudText>Streaming Minimum Log Level</MudText>
</div>
<MudSelect @bind-Value="_loggingSettings.StreamingMinimumLogLevel">
<MudSelectItem Value="@LogEventLevel.Debug">Debug</MudSelectItem>
<MudSelectItem Value="@LogEventLevel.Information">Information</MudSelectItem>
<MudSelectItem Value="@LogEventLevel.Warning">Warning</MudSelectItem>
<MudSelectItem Value="@LogEventLevel.Error">Error</MudSelectItem>
</MudSelect>
<MudSelect Class="mt-3"
Label="Request Logging Minimum Log Level"
@bind-Value="_loggingSettings.HttpMinimumLogLevel"
For="@(() => _loggingSettings.HttpMinimumLogLevel)">
</MudStack>
<MudStack Row="true" Breakpoint="Breakpoint.SmAndDown" Class="form-field-stack gap-md-8 mb-5">
<div class="d-flex justify-md-end">
<MudText>Request Logging Minimum Log Level</MudText>
</div>
<MudSelect @bind-Value="_loggingSettings.HttpMinimumLogLevel">
<MudSelectItem Value="@LogEventLevel.Debug">Debug</MudSelectItem>
<MudSelectItem Value="@LogEventLevel.Information">Information</MudSelectItem>
<MudSelectItem Value="@LogEventLevel.Warning">Warning</MudSelectItem>
<MudSelectItem Value="@LogEventLevel.Error">Error</MudSelectItem>
</MudSelect>
</MudForm>
</MudCardContent>
<MudCardActions>
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="@(_ => SaveLoggingSettings())" StartIcon="@Icons.Material.Filled.Save">
Save Settings
</MudButton>
</MudCardActions>
</MudCard>
</MudContainer>
</MudStack>
</MudContainer>
</div>
</MudForm>
@code {
private readonly CancellationTokenSource _cts = new();

56
ErsatzTV/Pages/Settings/PlayoutSettings.razor

@ -5,37 +5,31 @@ @@ -5,37 +5,31 @@
@inject ISnackbar Snackbar
@inject ILogger<PlayoutSettings> Logger
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="pt-8">
<MudCard Style="width: 350px">
<MudCardHeader>
<CardHeaderContent>
<MudText Typo="Typo.h6">Playout Settings</MudText>
</CardHeaderContent>
</MudCardHeader>
<MudCardContent>
<MudForm @bind-IsValid="@_playoutSuccess">
<MudTextField T="int"
Label="Days To Build"
@bind-Value="_playoutSettings.DaysToBuild"
Validation="@(new Func<int, string>(ValidatePlayoutDaysToBuild))"
Required="true"
RequiredError="Playout days to build is required!"
Adornment="Adornment.End"
AdornmentText="Days"/>
<MudElement HtmlTag="div" Class="mt-3">
<MudTooltip Text="Controls whether file-not-found or unavailable items should be included in playouts">
<MudCheckBox Label="Skip Missing Items"
@bind-Value="_playoutSettings.SkipMissingItems"
For="@(() => _playoutSettings.SkipMissingItems)"/>
</MudTooltip>
</MudElement>
</MudForm>
</MudCardContent>
<MudCardActions>
<MudButton Variant="Variant.Filled" Color="Color.Primary" Disabled="@(!_playoutSuccess)" OnClick="@(_ => SavePlayoutSettings())">Save Settings</MudButton>
</MudCardActions>
</MudCard>
</MudContainer>
<MudForm @bind-IsValid="@_playoutSuccess" Style="max-height: 100%">
<MudPaper Square="true" Style="display: flex; height: 64px; min-height: 64px; width: 100%; z-index: 100; align-items: center">
<MudButton Variant="Variant.Filled" Color="Color.Primary" Disabled="@(!_playoutSuccess)" OnClick="@(_ => SavePlayoutSettings())" Class="ml-8" StartIcon="@Icons.Material.Filled.Save">Save Settings</MudButton>
</MudPaper>
<div class="d-flex flex-column" style="height: 100vh; overflow-x: auto">
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="pt-8">
<MudText Typo="Typo.h5" Class="mb-2">Playout</MudText>
<MudDivider Class="mb-6" />
<MudStack Row="true" Breakpoint="Breakpoint.SmAndDown" Class="form-field-stack gap-md-8 mb-5">
<div class="d-flex justify-md-end">
<MudText>Days To Build</MudText>
</div>
<MudTextField @bind-Value="_playoutSettings.DaysToBuild" Validation="@(new Func<int, string>(ValidatePlayoutDaysToBuild))" Required="true" RequiredError="Playout days to build is required!" Adornment="Adornment.End" AdornmentText="days" />
</MudStack>
<MudStack Row="true" Breakpoint="Breakpoint.SmAndDown" Class="form-field-stack gap-md-8 mb-5">
<div class="d-flex justify-md-end">
<MudText>Skip Missing Items</MudText>
</div>
<MudCheckBox @bind-Value="_playoutSettings.SkipMissingItems" Dense="true">
<MudText Typo="Typo.caption" Style="font-weight: normal">Controls whether file-not-found or unavailable items should be included in playouts</MudText>
</MudCheckBox>
</MudStack>
</MudContainer>
</div>
</MudForm>
@code {
private readonly CancellationTokenSource _cts = new();

41
ErsatzTV/Pages/Settings/ScannerSettings.razor

@ -5,30 +5,23 @@ @@ -5,30 +5,23 @@
@inject ISnackbar Snackbar
@inject ILogger<ScannerSettings> Logger
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="pt-8">
<MudCard Style="width: 350px">
<MudCardHeader>
<CardHeaderContent>
<MudText Typo="Typo.h6">Scanner Settings</MudText>
</CardHeaderContent>
</MudCardHeader>
<MudCardContent>
<MudForm @bind-IsValid="@_scannerSuccess">
<MudTextField T="int"
Label="Library Refresh Interval"
@bind-Value="_libraryRefreshInterval"
Validation="@(new Func<int, string>(ValidateLibraryRefreshInterval))"
Required="true"
RequiredError="Library refresh interval is required!"
Adornment="Adornment.End"
AdornmentText="Hours"/>
</MudForm>
</MudCardContent>
<MudCardActions>
<MudButton Variant="Variant.Filled" Color="Color.Primary" Disabled="@(!_scannerSuccess)" OnClick="@(_ => SaveScannerSettings())">Save Settings</MudButton>
</MudCardActions>
</MudCard>
</MudContainer>
<MudForm @bind-IsValid="@_scannerSuccess" Style="max-height: 100%">
<MudPaper Square="true" Style="display: flex; height: 64px; min-height: 64px; width: 100%; z-index: 100; align-items: center">
<MudButton Variant="Variant.Filled" Color="Color.Primary" Disabled="@(!_scannerSuccess)" OnClick="@(_ => SaveScannerSettings())" Class="ml-8" StartIcon="@Icons.Material.Filled.Save">Save Settings</MudButton>
</MudPaper>
<div class="d-flex flex-column" style="height: 100vh; overflow-x: auto">
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="pt-8">
<MudText Typo="Typo.h5" Class="mb-2">Scanner</MudText>
<MudDivider Class="mb-6" />
<MudStack Row="true" Breakpoint="Breakpoint.SmAndDown" Class="form-field-stack gap-md-8 mb-5">
<div class="d-flex justify-md-end">
<MudText>Library Refresh Interval</MudText>
</div>
<MudTextField @bind-Value="_libraryRefreshInterval" Validation="@(new Func<int, string>(ValidateLibraryRefreshInterval))" Required="true" RequiredError="Library refresh interval is required!" Adornment="Adornment.End" AdornmentText="hours" />
</MudStack>
</MudContainer>
</div>
</MudForm>
@code {
private readonly CancellationTokenSource _cts = new();

57
ErsatzTV/Pages/Settings/XMLTVSettings.razor

@ -5,37 +5,32 @@ @@ -5,37 +5,32 @@
@inject ISnackbar Snackbar
@inject ILogger<XMLTVSettings> Logger
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="pt-8">
<MudCard Style="width: 350px">
<MudCardHeader>
<CardHeaderContent>
<MudText Typo="Typo.h6">XMLTV Settings</MudText>
</CardHeaderContent>
</MudCardHeader>
<MudCardContent>
<MudTextField T="int"
Label="Days To Build"
@bind-Value="_xmltvSettings.DaysToBuild"
Validation="@(new Func<int, string>(ValidateXmltvDaysToBuild))"
Required="true"
RequiredError="XMLTV days to build is required!"
Adornment="Adornment.End"
AdornmentText="Days"/>
<MudSelect Class="mt-3"
Label="XMLTV Time Zone"
@bind-Value="_xmltvSettings.TimeZone"
For="@(() => _xmltvSettings.TimeZone)">
<MudSelectItem Value="@XmltvTimeZone.Local">Local</MudSelectItem>
<MudSelectItem Value="@XmltvTimeZone.Utc">UTC</MudSelectItem>
</MudSelect>
</MudCardContent>
<MudCardActions>
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="@(_ => SaveXmltvSettings())" StartIcon="@Icons.Material.Filled.Save">
Save Settings
</MudButton>
</MudCardActions>
</MudCard>
</MudContainer>
<MudForm Style="max-height: 100%">
<MudPaper Square="true" Style="display: flex; height: 64px; min-height: 64px; width: 100%; z-index: 100; align-items: center">
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="@(_ => SaveXmltvSettings())" Class="ml-8" StartIcon="@Icons.Material.Filled.Save">Save Settings</MudButton>
</MudPaper>
<div class="d-flex flex-column" style="height: 100vh; overflow-x: auto">
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="pt-8">
<MudText Typo="Typo.h5" Class="mb-2">XMLTV</MudText>
<MudDivider Class="mb-6" />
<MudStack Row="true" Breakpoint="Breakpoint.SmAndDown" Class="form-field-stack gap-md-8 mb-5">
<div class="d-flex justify-md-end">
<MudText>Days To Build</MudText>
</div>
<MudTextField @bind-Value="_xmltvSettings.DaysToBuild" Validation="@(new Func<int, string>(ValidateXmltvDaysToBuild))" Required="true" RequiredError="XMLTV days to build is required!" Adornment="Adornment.End" AdornmentText="days" />
</MudStack>
<MudStack Row="true" Breakpoint="Breakpoint.SmAndDown" Class="form-field-stack gap-md-8 mb-5">
<div class="d-flex justify-md-end">
<MudText>XMLTV Time Zone</MudText>
</div>
<MudSelect @bind-Value="_xmltvSettings.TimeZone">
<MudSelectItem Value="@XmltvTimeZone.Local">Local</MudSelectItem>
<MudSelectItem Value="@XmltvTimeZone.Utc">UTC</MudSelectItem>
</MudSelect>
</MudStack>
</MudContainer>
</div>
</MudForm>
@code {
private readonly CancellationTokenSource _cts = new();

Loading…
Cancel
Save