Skip to content

The Free Software Media System - Server Backend & API

Merge branch 'master' into scoped-displaypreferences

Patrick Barrond81430270732
diff --cc Jellyfin.Server/CoreAppHost.cs
index 6f2434422c,755844dd9e..8d569a779a
--- a/Jellyfin.Server/CoreAppHost.cs
+++ b/Jellyfin.Server/CoreAppHost.cs
@@@ -64,16 -67,22 +69,18 @@@ namespace Jellyfin.Serve
Logger.LogWarning($"Skia not available. Will fallback to {nameof(NullImageEncoder)}.");
}
- serviceCollection.AddDbContextPool<JellyfinDb>(
- // TODO: Set up scoping and use AddDbContextPool,
- // can't register as Transient since tracking transient in GC is funky
- // serviceCollection.AddDbContext<JellyfinDb>(
- // options => options
- // .UseSqlite($"Filename={Path.Combine(ApplicationPaths.DataPath, "jellyfin.db")}"),
- // ServiceLifetime.Transient);
++ ServiceCollection.AddDbContextPool<JellyfinDb>(
+ options => options.UseSqlite($"Filename={Path.Combine(ApplicationPaths.DataPath, "jellyfin.db")}"));
- serviceCollection.AddSingleton<JellyfinDbProvider>();
+ ServiceCollection.AddEventServices();
+ ServiceCollection.AddSingleton<IEventManager, EventManager>();
+ ServiceCollection.AddSingleton<JellyfinDbProvider>();
- serviceCollection.AddSingleton<IActivityManager, ActivityManager>();
- serviceCollection.AddSingleton<IUserManager, UserManager>();
- serviceCollection.AddScoped<IDisplayPreferencesManager, DisplayPreferencesManager>();
+ ServiceCollection.AddSingleton<IActivityManager, ActivityManager>();
+ ServiceCollection.AddSingleton<IUserManager, UserManager>();
+ ServiceCollection.AddSingleton<IDisplayPreferencesManager, DisplayPreferencesManager>();
- base.RegisterServices(serviceCollection);
+ base.RegisterServices();
}
/// <inheritdoc />