jellyfin/MediaBrowser.Server.Mac/MacAppHost.cs

99 lines
2.6 KiB
C#
Raw Normal View History

2016-11-13 21:01:03 -07:00
using System;
2016-11-13 21:08:26 -07:00
using System.Collections.Generic;
using System.Reflection;
using Emby.Server.Core;
2016-11-19 11:20:26 -07:00
using Emby.Server.Implementations;
using Emby.Server.Implementations.FFMpeg;
2016-11-13 21:08:26 -07:00
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Logging;
using MediaBrowser.Model.System;
2016-11-13 22:41:57 -07:00
using Emby.Server.Mac.Native;
2016-11-13 21:08:26 -07:00
using System.Diagnostics;
2017-02-24 11:00:18 -07:00
using MediaBrowser.Controller.Connect;
using Emby.Server.Connect;
using Emby.Server.Sync;
using MediaBrowser.Controller.Sync;
2017-06-21 22:51:57 -07:00
using Emby.Server.CinemaMode;
2016-11-13 21:08:26 -07:00
2016-11-13 21:01:03 -07:00
namespace MediaBrowser.Server.Mac
{
2016-11-13 21:50:23 -07:00
public class MacAppHost : ApplicationHost
2016-11-13 21:01:03 -07:00
{
2017-08-22 11:47:53 -07:00
public MacAppHost(ServerApplicationPaths applicationPaths, ILogManager logManager, StartupOptions options, IFileSystem fileSystem, IPowerManagement powerManagement, string releaseAssetFilename, IEnvironmentInfo environmentInfo, MediaBrowser.Controller.Drawing.IImageEncoder imageEncoder, ISystemEvents systemEvents, MediaBrowser.Common.Net.INetworkManager networkManager) : base(applicationPaths, logManager, options, fileSystem, powerManagement, releaseAssetFilename, environmentInfo, imageEncoder, systemEvents, networkManager)
2016-11-13 21:08:26 -07:00
{
}
2017-08-22 11:47:53 -07:00
public override bool CanSelfRestart
2016-11-13 21:08:26 -07:00
{
get
{
2016-11-28 12:42:13 -07:00
return true;
2016-11-13 21:08:26 -07:00
}
}
public override bool CanSelfUpdate
{
get
{
return false;
}
}
2016-11-20 13:46:18 -07:00
protected override bool SupportsDualModeSockets
{
get
{
return true;
}
}
2017-02-24 11:00:18 -07:00
protected override IConnectManager CreateConnectManager()
{
return new ConnectManager();
}
protected override ISyncManager CreateSyncManager()
{
return new SyncManager();
}
2016-11-13 21:08:26 -07:00
protected override void RestartInternal()
{
2016-11-13 23:00:53 -07:00
MainClass.Restart();
2016-11-13 21:08:26 -07:00
}
protected override List<Assembly> GetAssembliesWithPartsInternal()
{
var list = new List<Assembly>();
list.Add(GetType().Assembly);
2017-06-21 22:51:57 -07:00
list.Add(typeof(DefaultIntroProvider).Assembly);
list.Add(typeof(ConnectManager).Assembly);
list.Add(typeof(SyncManager).Assembly);
2016-11-13 21:08:26 -07:00
return list;
}
protected override void ShutdownInternal()
{
MainClass.Shutdown();
}
protected override void AuthorizeServer()
{
throw new NotImplementedException();
}
protected override void ConfigureAutoRunInternal(bool autorun)
{
throw new NotImplementedException();
}
public override bool SupportsAutoRunAtStartup
{
get { return false; }
}
}
2016-11-13 21:01:03 -07:00
}