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());