aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/CoreAppHost.cs
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2020-06-15 20:21:25 +0900
committerGitHub <noreply@github.com>2020-06-15 20:21:25 +0900
commitdabb869a6b9f1c3359a663fd6b6e380f882e2ae2 (patch)
tree64dbd5a55d0a400f195c8de58d835739e82b9b74 /Jellyfin.Server/CoreAppHost.cs
parentb79957d07eeda3c888d0ec2051bb4185a410ac0e (diff)
parent100e9d586dff877610c488936aa035f61f6fedb5 (diff)
Merge branch 'master' into hwaccel
Diffstat (limited to 'Jellyfin.Server/CoreAppHost.cs')
-rw-r--r--Jellyfin.Server/CoreAppHost.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/Jellyfin.Server/CoreAppHost.cs b/Jellyfin.Server/CoreAppHost.cs
index 331a32c73..fe07411a6 100644
--- a/Jellyfin.Server/CoreAppHost.cs
+++ b/Jellyfin.Server/CoreAppHost.cs
@@ -7,8 +7,10 @@ using Emby.Server.Implementations;
using Jellyfin.Drawing.Skia;
using Jellyfin.Server.Implementations;
using Jellyfin.Server.Implementations.Activity;
+using Jellyfin.Server.Implementations.Users;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Drawing;
+using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Activity;
using MediaBrowser.Model.IO;
using Microsoft.EntityFrameworkCore;
@@ -63,12 +65,15 @@ namespace Jellyfin.Server
// TODO: Set up scoping and use AddDbContextPool
serviceCollection.AddDbContext<JellyfinDb>(
- options => options.UseSqlite($"Filename={Path.Combine(ApplicationPaths.DataPath, "jellyfin.db")}"),
- ServiceLifetime.Transient);
+ options => options
+ .UseSqlite($"Filename={Path.Combine(ApplicationPaths.DataPath, "jellyfin.db")}")
+ .UseLazyLoadingProxies(),
+ ServiceLifetime.Transient);
serviceCollection.AddSingleton<JellyfinDbProvider>();
serviceCollection.AddSingleton<IActivityManager, ActivityManager>();
+ serviceCollection.AddSingleton<IUserManager, UserManager>();
base.RegisterServices(serviceCollection);
}
@@ -79,7 +84,11 @@ namespace Jellyfin.Server
/// <inheritdoc />
protected override IEnumerable<Assembly> GetAssembliesWithPartsInternal()
{
+ // Jellyfin.Server
yield return typeof(CoreAppHost).Assembly;
+
+ // Jellyfin.Server.Implementations
+ yield return typeof(JellyfinDb).Assembly;
}
/// <inheritdoc />