aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFernando Fernández <ferferga@hotmail.com>2021-05-25 16:47:29 +0200
committerFernando Fernández <ferferga@hotmail.com>2021-09-06 20:35:02 +0200
commit59b67584fc18f73278404be33ddc8b7ea92019a0 (patch)
tree7a8a37512b106f1c769698a459ea422a0c72c611
parentec35b8b4255b32ff792d4f957fd160533bb0df3d (diff)
Use appHost.Resolve for accessing the context in Program.cs
-rw-r--r--Jellyfin.Server/Program.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index 6e87c8939..3c0ee069d 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -224,7 +224,7 @@ namespace Jellyfin.Server
{
_logger.LogInformation("Running query planner optimizations in the database... This might take a while");
// Run before disposing the application
- using var context = new JellyfinDbProvider(appHost.ServiceProvider, appPaths).CreateContext();
+ using var context = appHost.Resolve<JellyfinDbProvider>().CreateContext();
if (context.Database.IsSqlite())
{
context.Database.ExecuteSqlRaw("PRAGMA optimize");