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
+1
View File
@@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Properly extract and burn in embedded text subtitles using Jellyfin, Emby and Plex libraries
- Fix bug where deleting a channel would not remove its data from XMLTV
- Fix colorspace filter for some files with invalid color metadata
- Fix playback of external subtitles on Windows
### Changed
- Remove duplicate items from smart collections before scheduling
+6 -2
View File
@@ -27,8 +27,12 @@ public class SubtitlesFilter : BaseFilter
.Replace(@":/", @"\\:/");
effectiveFile = effectiveFile
.Replace(@"\", @"/\")
.Replace(@":/", @"\\:/");
.Replace(@"\", @"/\");
if (!effectiveFile.StartsWith("http"))
{
effectiveFile = effectiveFile.Replace(@":/", @"\\:/");
}
}
// escape brackets after escaping for windows
+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,