From 7391bada8bfba675bf43f52995ac10399864478b Mon Sep 17 00:00:00 2001 From: Kilian von Pflugk Date: Sun, 28 Jul 2024 18:53:23 +0200 Subject: [PATCH] only return timestamps for episodes --- .../Controllers/SkipIntroController.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Controllers/SkipIntroController.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Controllers/SkipIntroController.cs index 8a307ba..60626b9 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Controllers/SkipIntroController.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Controllers/SkipIntroController.cs @@ -88,6 +88,13 @@ public class SkipIntroController : ControllerBase [ActionName("UpdateTimestamps")] public ActionResult GetTimestamps([FromRoute] Guid id) { + // only get return content for episodes + var rawItem = Plugin.Instance!.GetItem(id); + if (rawItem == null || rawItem is not Episode episode) + { + return NotFound(); + } + var times = new TimeStamps(); if (Plugin.Instance!.Intros.TryGetValue(id, out var introValue)) {