mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-25 19:44:43 +01:00
Register and construct IImageProcessor, SqliteItemRepository and IImageEncoder correctly
This commit is contained in:
@@ -183,7 +183,6 @@ namespace Jellyfin.Server
|
||||
_loggerFactory,
|
||||
options,
|
||||
new ManagedFileSystem(_loggerFactory.CreateLogger<ManagedFileSystem>(), appPaths),
|
||||
GetImageEncoder(appPaths),
|
||||
new NetworkManager(_loggerFactory.CreateLogger<NetworkManager>()));
|
||||
|
||||
try
|
||||
@@ -553,25 +552,6 @@ namespace Jellyfin.Server
|
||||
}
|
||||
}
|
||||
|
||||
private static IImageEncoder GetImageEncoder(IApplicationPaths appPaths)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Test if the native lib is available
|
||||
SkiaEncoder.TestSkia();
|
||||
|
||||
return new SkiaEncoder(
|
||||
_loggerFactory.CreateLogger<SkiaEncoder>(),
|
||||
appPaths);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogWarning(ex, $"Skia not available. Will fallback to {nameof(NullImageEncoder)}.");
|
||||
}
|
||||
|
||||
return new NullImageEncoder();
|
||||
}
|
||||
|
||||
private static void StartNewInstance(StartupOptions options)
|
||||
{
|
||||
_logger.LogInformation("Starting new instance");
|
||||
|
||||
Reference in New Issue
Block a user