From 2266bfbc1c7caade9e24d7cbd5b4763808945512 Mon Sep 17 00:00:00 2001 From: ConfusedPolarBear <33811686+ConfusedPolarBear@users.noreply.github.com> Date: Mon, 11 Jul 2022 01:54:18 -0500 Subject: [PATCH] Cleanup --- .../QueueManager.cs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs b/ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs index 313b3b0..b4078ec 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs @@ -177,16 +177,6 @@ public class QueueManager return; } - var queue = Plugin.Instance.AnalysisQueue; - - // Allocate a new list for each new season - if (!queue.ContainsKey(episode.SeasonId)) - { - Plugin.Instance.AnalysisQueue[episode.SeasonId] = new List(); - } - - var config = Plugin.Instance!.Configuration; - // Limit analysis to the first X% of the episode and at most Y minutes. // X and Y default to 25% and 10 minutes. var duration = TimeSpan.FromTicks(episode.RunTimeTicks ?? 0).TotalSeconds; @@ -195,7 +185,7 @@ public class QueueManager duration *= analysisPercent; } - duration = Math.Min(duration, 60 * config.AnalysisLengthLimit); + duration = Math.Min(duration, 60 * Plugin.Instance!.Configuration.AnalysisLengthLimit); // Allocate a new list for each new season Plugin.Instance!.AnalysisQueue.TryAdd(episode.SeasonId, new List());