clean up build configs

This commit is contained in:
Luke Pulverenti
2017-05-16 01:44:06 -04:00
parent a3225ed810
commit 404171023f
15 changed files with 119 additions and 533 deletions

View File

@@ -1,6 +1,5 @@
using System;
using Emby.Drawing;
using Emby.Drawing.Net;
using Emby.Drawing.ImageMagick;
using Emby.Drawing.Skia;
using Emby.Server.Core;
@@ -22,34 +21,22 @@ namespace MediaBrowser.Server.Startup.Common
Func<IHttpClient> httpClient,
IApplicationPaths appPaths)
{
if (!startupOptions.ContainsOption("-enablegdi"))
try
{
try
{
return new SkiaEncoder(logManager.GetLogger("Skia"), appPaths, httpClient, fileSystem);
}
catch
{
logger.Error("Error loading Skia. Will revert to ImageMagick.");
}
try
{
return new ImageMagickEncoder(logManager.GetLogger("ImageMagick"), appPaths, httpClient, fileSystem);
}
catch
{
logger.Error("Error loading ImageMagick. Will revert to GDI.");
}
return new SkiaEncoder(logManager.GetLogger("Skia"), appPaths, httpClient, fileSystem);
}
catch
{
logger.Error("Error loading Skia. Will revert to ImageMagick.");
}
try
{
return new GDIImageEncoder(fileSystem, logManager.GetLogger("GDI"));
return new ImageMagickEncoder(logManager.GetLogger("ImageMagick"), appPaths, httpClient, fileSystem);
}
catch
{
logger.Error("Error loading GDI. Will revert to NullImageEncoder.");
logger.Error("Error loading ImageMagick. Will revert to GDI.");
}
return new NullImageEncoder();