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();