diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index 06b6fec555..0bc47627a1 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -48,7 +48,6 @@ using Emby.Server.Implementations.Session;
using Emby.Server.Implementations.SocketSharp;
using Emby.Server.Implementations.TV;
using Emby.Server.Implementations.Updates;
-using Jellyfin.Drawing.Skia;
using MediaBrowser.Api;
using MediaBrowser.Common;
using MediaBrowser.Common.Configuration;
@@ -540,13 +539,8 @@ namespace Emby.Server.Implementations
///
/// Registers services/resources with the service collection that will be available via DI.
///
- protected void RegisterServices(IServiceCollection serviceCollection)
+ protected virtual void RegisterServices(IServiceCollection serviceCollection)
{
- var imageEncoderType = SkiaEncoder.IsNativeLibAvailable()
- ? typeof(SkiaEncoder)
- : typeof(NullImageEncoder);
- serviceCollection.AddSingleton(typeof(IImageEncoder), imageEncoderType);
-
serviceCollection.AddSingleton(_startupOptions);
serviceCollection.AddMemoryCache();
diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj
index 6c20842c7f..d302d89843 100644
--- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj
+++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj
@@ -4,7 +4,6 @@
-
diff --git a/Jellyfin.Server/CoreAppHost.cs b/Jellyfin.Server/CoreAppHost.cs
index c3ac2ab411..0769bf844e 100644
--- a/Jellyfin.Server/CoreAppHost.cs
+++ b/Jellyfin.Server/CoreAppHost.cs
@@ -1,9 +1,12 @@
using System.Collections.Generic;
using System.Reflection;
+using Emby.Drawing;
using Emby.Server.Implementations;
+using Jellyfin.Drawing.Skia;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Drawing;
using MediaBrowser.Model.IO;
+using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Server
@@ -36,6 +39,17 @@ namespace Jellyfin.Server
{
}
+ ///
+ protected override void RegisterServices(IServiceCollection serviceCollection)
+ {
+ var imageEncoderType = SkiaEncoder.IsNativeLibAvailable()
+ ? typeof(SkiaEncoder)
+ : typeof(NullImageEncoder);
+ serviceCollection.AddSingleton(typeof(IImageEncoder), imageEncoderType);
+
+ base.RegisterServices(serviceCollection);
+ }
+
///
protected override void RestartInternal() => Program.Restart();