diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Controllers/SkipIntroController.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Controllers/SkipIntroController.cs index a595c2f..837f73c 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Controllers/SkipIntroController.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Controllers/SkipIntroController.cs @@ -88,15 +88,11 @@ public ActionResult> GetSkippableSegments([FromR var config = Plugin.Instance!.Configuration; segment.ShowSkipPromptAt = Math.Max(0, segment.IntroStart - config.ShowPromptAdjustment); - segment.HideSkipPromptAt = segment.IntroStart + config.HidePromptAdjustment; + segment.HideSkipPromptAt = Math.Min( + segment.IntroStart + config.HidePromptAdjustment, + segment.IntroEnd); segment.IntroEnd -= config.SecondsOfIntroToPlay; - // Don't show prompt after the segment has ended - if (segment.HideSkipPromptAt > segment.IntroEnd) - { - segment.HideSkipPromptAt = segment.IntroEnd; - } - return segment; } catch (KeyNotFoundException)