From aa1e0b8966d7349c5ceb626b3f359f9237b3e080 Mon Sep 17 00:00:00 2001 From: rlauu <46294892+rlauu@users.noreply.github.com> Date: Sun, 20 Oct 2024 13:35:33 +0200 Subject: [PATCH] check if valid --- .../Analyzers/BlackFrameAnalyzer.cs | 2 +- .../Analyzers/ChapterAnalyzer.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/BlackFrameAnalyzer.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/BlackFrameAnalyzer.cs index c4dcaa4..4b13057 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/BlackFrameAnalyzer.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/BlackFrameAnalyzer.cs @@ -121,7 +121,7 @@ public class BlackFrameAnalyzer : IMediaFileAnalyzer searchDistance, _blackFrameMinimumPercentage); - if (credit is null) + if (credit is null || !credit.Valid) { // If no credits were found, reset the first-episode search logic for the next episode in the sequence. searchStart = _minimumCreditsDuration; diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/ChapterAnalyzer.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/ChapterAnalyzer.cs index f3384af..538c371 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/ChapterAnalyzer.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Analyzers/ChapterAnalyzer.cs @@ -55,7 +55,7 @@ public class ChapterAnalyzer(ILogger logger) : IMediaFileAnalyz expression, mode); - if (skipRange is null) + if (skipRange is null || !skipRange.Valid) { continue; }