fix external subtitle playback on windows (#1256)

This commit is contained in:
Jason Dove
2023-04-23 09:53:57 -05:00
committed by GitHub
parent 6bb1c4299f
commit 30850329f3
4 changed files with 15 additions and 9 deletions
+6 -6
View File
@@ -114,7 +114,7 @@
{
<MudAutocomplete Class="mt-3" T="MediaCollectionViewModel" Label="Collection"
@bind-Value="_selectedItem.Collection" SearchFunc="@SearchCollections"
ToStringFunc="@(c=> c.Name)" Placeholder="Type to search...">
ToStringFunc="@(c=> c?.Name)" Placeholder="Type to search...">
<MoreItemsTemplate>
<MudText Align="Align.Center" Class="px-4 py-1">
Only the first 10 items are shown
@@ -126,7 +126,7 @@
{
<MudAutocomplete Class="mt-3" T="MultiCollectionViewModel" Label="Multi Collection"
@bind-Value="_selectedItem.MultiCollection" SearchFunc="@SearchMultiCollections"
ToStringFunc="@(c=> c.Name)" Placeholder="Type to search...">
ToStringFunc="@(c=> c?.Name)" Placeholder="Type to search...">
<MoreItemsTemplate>
<MudText Align="Align.Center" Class="px-4 py-1">
Only the first 10 items are shown
@@ -138,7 +138,7 @@
{
<MudAutocomplete Class="mt-3" T="SmartCollectionViewModel" Label="Smart Collection"
@bind-Value="_selectedItem.SmartCollection" SearchFunc="@SearchSmartCollections"
ToStringFunc="@(c=> c.Name)" Placeholder="Type to search...">
ToStringFunc="@(c=> c?.Name)" Placeholder="Type to search...">
<MoreItemsTemplate>
<MudText Align="Align.Center" Class="px-4 py-1">
Only the first 10 items are shown
@@ -150,7 +150,7 @@
{
<MudAutocomplete Class="mt-3" T="NamedMediaItemViewModel" Label="Television Show"
@bind-Value="_selectedItem.MediaItem" SearchFunc="@SearchTelevisionShows"
ToStringFunc="@(c=> c.Name)" Placeholder="Type to search...">
ToStringFunc="@(c=> c?.Name)" Placeholder="Type to search...">
<MoreItemsTemplate>
<MudText Align="Align.Center" Class="px-4 py-1">
Only the first 10 items are shown
@@ -162,7 +162,7 @@
{
<MudAutocomplete Class="mt-3" T="NamedMediaItemViewModel" Label="Television Season"
@bind-Value="_selectedItem.MediaItem" SearchFunc="@SearchTelevisionSeasons"
ToStringFunc="@(c=> c.Name)" Placeholder="Type to search..."
ToStringFunc="@(c=> c?.Name)" Placeholder="Type to search..."
MaxItems="20">
<MoreItemsTemplate>
<MudText Align="Align.Center" Class="px-4 py-1">
@@ -175,7 +175,7 @@
{
<MudAutocomplete Class="mt-3" T="NamedMediaItemViewModel" Label="Artist"
@bind-Value="_selectedItem.MediaItem" SearchFunc="@SearchArtists"
ToStringFunc="@(c=> c.Name)" Placeholder="Type to search..."
ToStringFunc="@(c=> c?.Name)" Placeholder="Type to search..."
MaxItems="10">
<MoreItemsTemplate>
<MudText Align="Align.Center" Class="px-4 py-1">
+2 -1
View File
@@ -1,3 +1,4 @@
using System.Diagnostics;
using System.Runtime.InteropServices;
using Destructurama;
using ErsatzTV.Core;
@@ -52,7 +53,7 @@ public class Program
.WriteTo.File(FileSystemLayout.LogFilePath, rollingInterval: RollingInterval.Day);
// for performance reasons, restrict windows console to error logs
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !Debugger.IsAttached)
{
loggerConfiguration = loggerConfiguration.WriteTo.Console(
restrictedToMinimumLevel: LogEventLevel.Error,