mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-17 19:08:53 -07:00
update mac project
This commit is contained in:
parent
cd0d4f419c
commit
375d856dfb
@ -32,7 +32,9 @@ using Mono.Unix.Native;
|
||||
using MediaBrowser.Model.System;
|
||||
using MediaBrowser.Model.IO;
|
||||
using Emby.Server.Core.Logging;
|
||||
using Emby.Drawing.Net;
|
||||
using Emby.Drawing.Skia;
|
||||
using MediaBrowser.Controller.Drawing;
|
||||
using MediaBrowser.Model.Drawing;
|
||||
|
||||
namespace MediaBrowser.Server.Mac
|
||||
{
|
||||
@ -112,7 +114,7 @@ namespace MediaBrowser.Server.Mac
|
||||
|
||||
_fileSystem = fileSystem;
|
||||
|
||||
var imageEncoder = new GDIImageEncoder(fileSystem, logManager.GetLogger("GDI"));
|
||||
var imageEncoder = GetImageEncoder(appPaths, fileSystem, logManager);
|
||||
|
||||
AppHost = new MacAppHost(appPaths,
|
||||
logManager,
|
||||
@ -138,6 +140,18 @@ namespace MediaBrowser.Server.Mac
|
||||
Task.Run (() => StartServer(CancellationToken.None));
|
||||
}
|
||||
|
||||
private static IImageEncoder GetImageEncoder(ServerApplicationPaths appPaths, IFileSystem fileSystem, ILogManager logManager)
|
||||
{
|
||||
try
|
||||
{
|
||||
return new SkiaEncoder(logManager.GetLogger("Skia"), appPaths, () => AppHost.HttpClient, fileSystem);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new GDIImageEncoder(fileSystem, logManager.GetLogger("GDI"));
|
||||
}
|
||||
}
|
||||
|
||||
private static void GenerateCertificate(string certPath, string certHost, string certPassword)
|
||||
{
|
||||
CertificateGenerator.CreateSelfSignCertificatePfx(certPath, certHost, certPassword, _logger);
|
||||
|
Loading…
Reference in New Issue
Block a user