From 4b353bc0249c525c80fc070bd673794712d9d0eb Mon Sep 17 00:00:00 2001 From: TwistedUmbrellaX Date: Thu, 7 Mar 2024 17:08:15 -0500 Subject: [PATCH] Still check for ffmpeg errors on load --- ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs | 2 ++ .../ScheduledTasks/BaseItemAnalyzerTask.cs | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs index 5fd0b8d..8f1c015 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs @@ -109,6 +109,8 @@ public class Plugin : BasePlugin, IHasWebPages _logger.LogError("Unknown error encountered while adding skip button: {Error}", ex); } } + + FFmpegWrapper.CheckFFmpegVersion(); } /// diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/ScheduledTasks/BaseItemAnalyzerTask.cs b/ConfusedPolarBear.Plugin.IntroSkipper/ScheduledTasks/BaseItemAnalyzerTask.cs index cc7cf17..82c2cfc 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/ScheduledTasks/BaseItemAnalyzerTask.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/ScheduledTasks/BaseItemAnalyzerTask.cs @@ -53,8 +53,9 @@ public class BaseItemAnalyzerTask IProgress progress, CancellationToken cancellationToken) { + var ffmpegError = FFmpegWrapper.CheckFFmpegVersion(); // Assert that ffmpeg with chromaprint is installed - if (Plugin.Instance!.Configuration.UseChromaprint && !FFmpegWrapper.CheckFFmpegVersion()) + if (Plugin.Instance!.Configuration.UseChromaprint && !ffmpegError) { throw new FingerprintException( "Analysis terminated! Chromaprint is not enabled in the current ffmpeg. If Jellyfin is running natively, install jellyfin-ffmpeg5. If Jellyfin is running in a container, upgrade to version 10.8.0 or newer.");