Create db before trying to restore timestamps

This commit is contained in:
rlauu 2024-11-25 17:32:04 +01:00
parent cb0fdb92ad
commit d4f88e0f3e

View File

@ -77,15 +77,6 @@ public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
Directory.CreateDirectory(FingerprintCachePath); 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. // Initialize database, restore timestamps if available.
try try
{ {
@ -97,6 +88,15 @@ public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
logger.LogWarning("Error initializing database: {Exception}", ex); 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(); FFmpegWrapper.CheckFFmpegVersion();
} }