diff options
| author | Vasily <JustAMan@users.noreply.github.com> | 2019-01-05 03:07:00 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-05 03:07:00 +0300 |
| commit | 80c3832610fa327beb86c8a34cab092025a46291 (patch) | |
| tree | ffbd66938814d7da0bb18fc9e0463a0a0452e8aa /Jellyfin.Server/Program.cs | |
| parent | f93cd97f9b66939908f95b601e2cbffa2e9eb63c (diff) | |
| parent | 22adb838e6364839647a60731c17b464e494538a (diff) | |
Merge pull request #391 from EraYaN/remove-old-imageencoders
Remove old ImageEncoders (ImageMagick & Drawing.Net).
Skia should be enough.
Diffstat (limited to 'Jellyfin.Server/Program.cs')
| -rw-r--r-- | Jellyfin.Server/Program.cs | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs index 9cc2fe103..2dd4d9af6 100644 --- a/Jellyfin.Server/Program.cs +++ b/Jellyfin.Server/Program.cs @@ -1,4 +1,4 @@ -using System;
+using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
@@ -8,7 +8,6 @@ using System.Reflection; using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Emby.Drawing;
-using Emby.Drawing.ImageMagick;
using Emby.Drawing.Skia;
using Emby.Server.Implementations;
using Emby.Server.Implementations.EnvironmentInfo;
@@ -194,26 +193,13 @@ namespace Jellyfin.Server IEnvironmentInfo environment,
ILocalizationManager localizationManager)
{
- if (!startupOptions.ContainsOption("-enablegdi"))
+ try
{
- try
- {
- return new SkiaEncoder(logger, appPaths, httpClient, fileSystem, localizationManager);
- }
- catch (Exception ex)
- {
- logger.LogInformation(ex, "Skia not available. Will try next image processor. {0}");
- }
-
- try
- {
- return new ImageMagickEncoder(logger, appPaths, httpClient, fileSystem, environment);
- }
- catch (Exception ex)
- {
- logger.LogInformation(ex, "ImageMagick not available. Will try next image processor.");
- }
- _logger.LogInformation("Falling back on NullImageEncoder");
+ return new SkiaEncoder(logger, appPaths, httpClient, fileSystem, localizationManager);
+ }
+ catch (Exception ex)
+ {
+ logger.LogInformation(ex, "Skia not available. Will fallback to NullIMageEncoder. {0}");
}
return new NullImageEncoder();
|
