mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 02:18:54 -07:00
update mac project
This commit is contained in:
parent
05c678249b
commit
55e8a61218
@ -32,7 +32,10 @@ using Mono.Unix.Native;
|
||||
using MediaBrowser.Model.System;
|
||||
using MediaBrowser.Model.IO;
|
||||
using Emby.Server.Core.Logging;
|
||||
using Emby.Drawing.Net;
|
||||
using Emby.Drawing;
|
||||
using Emby.Drawing.Skia;
|
||||
using MediaBrowser.Controller.Drawing;
|
||||
using MediaBrowser.Model.Drawing;
|
||||
|
||||
namespace MediaBrowser.Server.Mac
|
||||
{
|
||||
@ -112,7 +115,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 +141,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 NullImageEncoder();
|
||||
}
|
||||
}
|
||||
|
||||
private static void GenerateCertificate(string certPath, string certHost, string certPassword)
|
||||
{
|
||||
CertificateGenerator.CreateSelfSignCertificatePfx(certPath, certHost, certPassword, _logger);
|
||||
|
Loading…
Reference in New Issue
Block a user