From 10ec9eff83d5605189b18766f9fd7fc2a3a93112 Mon Sep 17 00:00:00 2001 From: TwistedUmbrellaX Date: Sat, 20 Apr 2024 09:23:42 -0400 Subject: [PATCH] Prevent a possible runtime mistake Technically, the instance is already validated by intros, but if they get skipped for some reason, the variable might lose its confidence. Automated code correction does things like that a lot. --- ConfusedPolarBear.Plugin.IntroSkipper/Entrypoint.cs | 2 -- ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Entrypoint.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Entrypoint.cs index 6ca1ac1..381eb81 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Entrypoint.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Entrypoint.cs @@ -1,7 +1,5 @@ using System; using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.IO; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Entities.TV; diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs index 4d073ab..fcdd4aa 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs @@ -7,7 +7,6 @@ using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Plugins; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Entities; -using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Persistence; using MediaBrowser.Model.Entities; @@ -215,7 +214,7 @@ public class Plugin : BasePlugin, IHasWebPages // Serialize credits introList.Clear(); - foreach (var intro in Instance.Credits) + foreach (var intro in Instance!.Credits) { introList.Add(intro.Value); }