From 4d7dbf7f0fd154de5cba458c8695e79c6ffed192 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 --- IntroSkipper/Analyzers/BlackFrameAnalyzer.cs | 2 +- IntroSkipper/Analyzers/ChapterAnalyzer.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/IntroSkipper/Analyzers/BlackFrameAnalyzer.cs b/IntroSkipper/Analyzers/BlackFrameAnalyzer.cs index bb8f1ec..5230224 100644 --- a/IntroSkipper/Analyzers/BlackFrameAnalyzer.cs +++ b/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/IntroSkipper/Analyzers/ChapterAnalyzer.cs b/IntroSkipper/Analyzers/ChapterAnalyzer.cs index 6cf832b..5662a54 100644 --- a/IntroSkipper/Analyzers/ChapterAnalyzer.cs +++ b/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; }