diff --git a/IntroSkipper/Plugin.cs b/IntroSkipper/Plugin.cs index 335ce23..d3c3f46 100644 --- a/IntroSkipper/Plugin.cs +++ b/IntroSkipper/Plugin.cs @@ -477,45 +477,7 @@ public class Plugin : BasePlugin, IHasWebPages /// Full path to index.html. private void InjectSkipButton(string webPath) { - string searchPattern = "dashboard-dashboard.*.chunk.js"; - string[] filePaths = Directory.GetFiles(webPath, searchPattern, SearchOption.TopDirectoryOnly); - string pattern = @"buildVersion""\)\.innerText=""(?\d+\.\d+\.\d+)"",.*?webVersion""\)\.innerText=""(?\d+\.\d+\.\d+)"; - string webVersionString = "unknown"; - // Create a Regex object - Regex regex = new Regex(pattern); - - // should be only one file but this safer - foreach (var file in filePaths) - { - string dashBoardText = File.ReadAllText(file); - // Perform the match - Match match = regex.Match(dashBoardText); - // search for buildVersion and webVersion - if (match.Success) - { - webVersionString = match.Groups["webVersion"].Value; - _logger.LogInformation("Found jellyfin-web <{WebVersion}>", webVersionString); - break; - } - } - - if (webVersionString != "unknown") - { - // append Revision - webVersionString += ".0"; - if (Version.TryParse(webVersionString, out var webversion)) - { - if (_applicationHost.ApplicationVersion != webversion) - { - _logger.LogWarning("The jellyfin-web <{WebVersion}> NOT compatible with Jellyfin <{JellyfinVersion}>", webVersionString, _applicationHost.ApplicationVersion); - } - else - { - _logger.LogInformation("The jellyfin-web <{WebVersion}> compatible with Jellyfin <{JellyfinVersion}>", webVersionString, _applicationHost.ApplicationVersion); - } - } - } - + string pattern; // Inject the skip intro button code into the web interface. string indexPath = Path.Join(webPath, "index.html");