aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/CoreAppHost.cs
diff options
context:
space:
mode:
authorNegulici-R. Barnabas <109497789+negulici-r-barnabas@users.noreply.github.com>2022-11-13 15:29:16 +0200
committerGitHub <noreply@github.com>2022-11-13 15:29:16 +0200
commitb7aa5ed862db11bbbc0a4ea5c92a67b772bfc35d (patch)
treed8f396f581f3bdbd4be4c34d4a949df9fff72934 /Jellyfin.Server/CoreAppHost.cs
parent1e41636e30b82518633ac6979564ff98bb40aca9 (diff)
parent6655cf4e58285f51b612efb0bb6229f036da2591 (diff)
Merge branch 'jellyfin:master' into master
Diffstat (limited to 'Jellyfin.Server/CoreAppHost.cs')
-rw-r--r--Jellyfin.Server/CoreAppHost.cs15
1 files changed, 7 insertions, 8 deletions
diff --git a/Jellyfin.Server/CoreAppHost.cs b/Jellyfin.Server/CoreAppHost.cs
index 67e50b92d..002193baf 100644
--- a/Jellyfin.Server/CoreAppHost.cs
+++ b/Jellyfin.Server/CoreAppHost.cs
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
-using System.IO;
using System.Reflection;
using Emby.Drawing;
using Emby.Server.Implementations;
@@ -19,6 +18,7 @@ using MediaBrowser.Controller.Devices;
using MediaBrowser.Controller.Drawing;
using MediaBrowser.Controller.Events;
using MediaBrowser.Controller.Library;
+using MediaBrowser.Controller.Lyrics;
using MediaBrowser.Controller.Net;
using MediaBrowser.Controller.Security;
using MediaBrowser.Model.Activity;
@@ -70,19 +70,13 @@ namespace Jellyfin.Server
Logger.LogWarning("Skia not available. Will fallback to {ImageEncoder}.", nameof(NullImageEncoder));
}
- serviceCollection.AddDbContextPool<JellyfinDb>(
- options => options
- .UseLoggerFactory(LoggerFactory)
- .UseSqlite($"Filename={Path.Combine(ApplicationPaths.DataPath, "jellyfin.db")}"));
-
serviceCollection.AddEventServices();
serviceCollection.AddSingleton<IBaseItemManager, BaseItemManager>();
serviceCollection.AddSingleton<IEventManager, EventManager>();
- serviceCollection.AddSingleton<JellyfinDbProvider>();
serviceCollection.AddSingleton<IActivityManager, ActivityManager>();
serviceCollection.AddSingleton<IUserManager, UserManager>();
- serviceCollection.AddSingleton<IDisplayPreferencesManager, DisplayPreferencesManager>();
+ serviceCollection.AddScoped<IDisplayPreferencesManager, DisplayPreferencesManager>();
serviceCollection.AddSingleton<IDeviceManager, DeviceManager>();
// TODO search the assemblies instead of adding them manually?
@@ -95,6 +89,11 @@ namespace Jellyfin.Server
serviceCollection.AddScoped<IAuthenticationManager, AuthenticationManager>();
+ foreach (var type in GetExportTypes<ILyricProvider>())
+ {
+ serviceCollection.AddSingleton(typeof(ILyricProvider), type);
+ }
+
base.RegisterServices(serviceCollection);
}