From 4cf8b83de49d7d7e212e5cf24b03fa5ae85a4eda Mon Sep 17 00:00:00 2001 From: Jason Dove <1695733+jasongdove@users.noreply.github.com> Date: Tue, 30 Jan 2024 14:29:13 -0600 Subject: [PATCH] ignore subtitles when they are unavailable (#1583) --- CHANGELOG.md | 1 + ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ada6ca4a..cdf9d0c7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - This bug caused the ErsatzTV logo to be used instead of channel logos in some cases - Update drop down search results in main search bar when items are created/edited/removed - Fix green line at bottom of video when NVIDIA accel is used with intermittent watermark +- Fix error starting streaming session when subtitles are still being extracted for the current item ### Changed - Upgrade from .NET 7 to .NET 8 diff --git a/ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs b/ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs index 1cd2dc24f..dcd516144 100644 --- a/ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs +++ b/ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs @@ -228,7 +228,7 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService Option subtitleInputFile = maybeSubtitle.Map>( subtitle => { - if (!subtitle.IsImage && subtitle.SubtitleKind == SubtitleKind.Embedded && !subtitle.IsExtracted) + if (!subtitle.IsImage && subtitle.SubtitleKind == SubtitleKind.Embedded && (!subtitle.IsExtracted || string.IsNullOrWhiteSpace(subtitle.Path))) { _logger.LogWarning("Subtitles are not yet available for this item"); return None;