CoreAppHost.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System.Collections.Generic;
  2. using System.Reflection;
  3. using Emby.Server.Implementations;
  4. using Emby.Server.Implementations.HttpServer;
  5. using MediaBrowser.Model.IO;
  6. using MediaBrowser.Model.System;
  7. using Microsoft.Extensions.Configuration;
  8. using Microsoft.Extensions.Logging;
  9. namespace Jellyfin.Server
  10. {
  11. public class CoreAppHost : ApplicationHost
  12. {
  13. public CoreAppHost(
  14. ServerApplicationPaths applicationPaths,
  15. ILoggerFactory loggerFactory,
  16. StartupOptions options,
  17. IFileSystem fileSystem,
  18. IEnvironmentInfo environmentInfo,
  19. MediaBrowser.Controller.Drawing.IImageEncoder imageEncoder,
  20. MediaBrowser.Common.Net.INetworkManager networkManager,
  21. IConfiguration configuration)
  22. : base(
  23. applicationPaths,
  24. loggerFactory,
  25. options,
  26. fileSystem,
  27. environmentInfo,
  28. imageEncoder,
  29. networkManager,
  30. configuration)
  31. {
  32. }
  33. public override bool CanSelfRestart => StartupOptions.RestartPath != null;
  34. protected override bool SupportsDualModeSockets => true;
  35. protected override void RestartInternal() => Program.Restart();
  36. protected override IEnumerable<Assembly> GetAssembliesWithPartsInternal()
  37. {
  38. yield return typeof(CoreAppHost).Assembly;
  39. }
  40. protected override void ShutdownInternal() => Program.Shutdown();
  41. }
  42. }