From aa1faf0f6ff44fedd57e35e6a24486448127e61b Mon Sep 17 00:00:00 2001 From: rlauuzo <46294892+rlauuzo@users.noreply.github.com> Date: Fri, 24 May 2024 19:06:07 +0200 Subject: [PATCH] check if timestamps are invalid (#177) Co-authored-by: github-actions[bot] Co-authored-by: rlauu <46294892+rlauu@users.noreply.github.com> --- ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs b/ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs index 2c1d1ac..e81a9c7 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs @@ -270,13 +270,13 @@ public class QueueManager { verified.Add(candidate); - if (requiresIntroAnalysis && !Plugin.Instance!.Intros.ContainsKey(candidate.EpisodeId)) + if (requiresIntroAnalysis && (!Plugin.Instance!.Intros.TryGetValue(candidate.EpisodeId, out var intro) || !intro.Valid)) { reqModes.Add(AnalysisMode.Introduction); requiresIntroAnalysis = false; // No need to check again } - if (requiresCreditsAnalysis && !Plugin.Instance!.Credits.ContainsKey(candidate.EpisodeId)) + if (requiresCreditsAnalysis && (!Plugin.Instance!.Credits.TryGetValue(candidate.EpisodeId, out var credit) || !credit.Valid)) { reqModes.Add(AnalysisMode.Credits); requiresCreditsAnalysis = false; // No need to check again