From 2678c69e38dd44850d002e74ed60ab2f2b4414cb Mon Sep 17 00:00:00 2001 From: TwistedUmbrellaX Date: Sat, 12 Oct 2024 11:27:11 -0400 Subject: [PATCH] Make list compatible with 10.8 (maybe) --- ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs index de18c71..95463b9 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; using System.Text.RegularExpressions; using ConfusedPolarBear.Plugin.IntroSkipper.Configuration; using MediaBrowser.Common.Configuration; @@ -402,16 +403,16 @@ public class Plugin : BasePlugin, IHasWebPages { try { - List oldRepos = - [ + List oldRepos = new List + { "https://raw.githubusercontent.com/intro-skipper/intro-skipper/master/manifest.json", "https://raw.githubusercontent.com/jumoog/intro-skipper/master/manifest.json" - ]; + }; // Access the current server configuration var config = serverConfiguration.Configuration; // Get the list of current plugin repositories - var pluginRepositories = config.PluginRepositories?.ToList() ?? []; + var pluginRepositories = config.PluginRepositories?.ToList() ?? new List(); // check if old plugins exits if (pluginRepositories.Exists(repo => repo != null && repo.Url != null && oldRepos.Contains(repo.Url))) @@ -432,7 +433,7 @@ public class Plugin : BasePlugin, IHasWebPages } // Update the configuration with the new repository list - config.PluginRepositories = [.. pluginRepositories]; + config.PluginRepositories = pluginRepositories.ToList(); // Save the updated configuration serverConfiguration.SaveConfiguration();