diff --git a/IntroSkipper/Helper/LegacyMigrations.cs b/IntroSkipper/Helper/LegacyMigrations.cs
index 4fb6180..7007c79 100644
--- a/IntroSkipper/Helper/LegacyMigrations.cs
+++ b/IntroSkipper/Helper/LegacyMigrations.cs
@@ -63,7 +63,7 @@ internal static class LegacyMigrations
catch (Exception ex)
{
// Handle exceptions, such as file not found, deserialization errors, etc.
- logger.LogWarning("Something stupid happened: {Exception}", ex);
+ logger.LogWarning("Failed to migrate from the ConfusedPolarBear Config {Exception}", ex);
}
}
}
@@ -111,44 +111,52 @@ internal static class LegacyMigrations
string pattern;
string indexPath = Path.Join(webPath, "index.html");
- if (File.Exists(indexPath))
+ try
{
- logger.LogDebug("Reading index.html from {Path}", indexPath);
- string contents = File.ReadAllText(indexPath);
-
- if (!plugin.Configuration.SkipButtonEnabled)
+ if (File.Exists(indexPath))
{
- pattern = @"";
+
+ if (contents.Contains(scriptTag, StringComparison.OrdinalIgnoreCase))
+ {
+ logger.LogInformation("The skip button has already been injected.");
+ return;
+ }
+
+ pattern = @"";
-
- if (contents.Contains(scriptTag, StringComparison.OrdinalIgnoreCase))
+ else
{
- logger.LogInformation("The skip button has already been injected.");
- return;
+ logger.LogInformation("Jellyfin running as nowebclient");
}
-
- pattern = @"