only return timestamps for episodes

This commit is contained in:
Kilian von Pflugk 2024-07-28 18:53:23 +02:00 committed by TwistedUmbrellaX
parent c2966d81e8
commit 3117db57c5

View File

@ -86,6 +86,13 @@ public class SkipIntroController : ControllerBase
[ActionName("UpdateTimestamps")]
public ActionResult<TimeStamps> 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))
{