try catch InjectSkipButton

This commit is contained in:
Kilian von Pflugk 2024-11-24 15:30:42 +01:00
parent 89d3fe79ec
commit a89e61b919

View File

@ -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,6 +111,8 @@ internal static class LegacyMigrations
string pattern;
string indexPath = Path.Join(webPath, "index.html");
try
{
if (File.Exists(indexPath))
{
logger.LogDebug("Reading index.html from {Path}", indexPath);
@ -151,6 +153,12 @@ internal static class LegacyMigrations
logger.LogInformation("Jellyfin running as nowebclient");
}
}
catch (Exception ex)
{
WarningManager.SetFlag(PluginWarning.UnableToAddSkipButton);
logger.LogError("Failed to add skip button to web interface. See https://github.com/intro-skipper/intro-skipper/wiki/Troubleshooting#skip-button-is-not-visible for the most common issues. Error: {Error}", ex);
}
}
private static void RestoreTimestamps(string dbPath, string introPath, string creditsPath)
{