From 0d44d330100488ca19a4f69aa024a171ab3ef088 Mon Sep 17 00:00:00 2001 From: ConfusedPolarBear <33811686+ConfusedPolarBear@users.noreply.github.com> Date: Thu, 9 Jun 2022 15:38:30 -0500 Subject: [PATCH] Catch ResourceNotFoundException Thrown if the user abruptly stops playback --- ConfusedPolarBear.Plugin.IntroSkipper/AutoSkip.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/AutoSkip.cs b/ConfusedPolarBear.Plugin.IntroSkipper/AutoSkip.cs index c067b06..a0c16bf 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/AutoSkip.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/AutoSkip.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using System.Timers; +using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Plugins; using MediaBrowser.Controller.Session; @@ -96,7 +97,7 @@ public class AutoSkip : IServerEntryPoint return; } } - catch (NullReferenceException) + catch (Exception ex) when (ex is NullReferenceException || ex is ResourceNotFoundException) { return; }