From d4f88e0f3e5f290becc0ac27b5fed6ef1a13db99 Mon Sep 17 00:00:00 2001 From: rlauu <46294892+rlauu@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:32:04 +0100 Subject: [PATCH] Create db before trying to restore timestamps --- IntroSkipper/Plugin.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/IntroSkipper/Plugin.cs b/IntroSkipper/Plugin.cs index 61b3981..7711b58 100644 --- a/IntroSkipper/Plugin.cs +++ b/IntroSkipper/Plugin.cs @@ -77,15 +77,6 @@ public class Plugin : BasePlugin, IHasWebPages Directory.CreateDirectory(FingerprintCachePath); } - try - { - LegacyMigrations.MigrateAll(this, serverConfiguration, logger, applicationPaths); - } - catch (Exception ex) - { - logger.LogError("Failed to perform migrations. Error: {Error}", ex); - } - // Initialize database, restore timestamps if available. try { @@ -97,6 +88,15 @@ public class Plugin : BasePlugin, IHasWebPages logger.LogWarning("Error initializing database: {Exception}", ex); } + try + { + LegacyMigrations.MigrateAll(this, serverConfiguration, logger, applicationPaths); + } + catch (Exception ex) + { + logger.LogError("Failed to perform migrations. Error: {Error}", ex); + } + FFmpegWrapper.CheckFFmpegVersion(); }