Browse Source

Merge pull request #2877 from MediaBrowser/dev

Dev
Luke 7 năm trước cách đây
mục cha
commit
58cd0bb287

+ 0 - 17
Emby.Server.Implementations/ApplicationHost.cs

@@ -439,14 +439,6 @@ namespace Emby.Server.Implementations
             }
         }
 
-        public virtual bool SupportsRunningAsService
-        {
-            get
-            {
-                return false;
-            }
-        }
-
         private DeviceId _deviceId;
         public string SystemId
         {
@@ -473,14 +465,6 @@ namespace Emby.Server.Implementations
             }
         }
 
-        public virtual bool IsRunningAsService
-        {
-            get
-            {
-                return false;
-            }
-        }
-
         private Assembly GetAssembly(Type type)
         {
             return type.GetTypeInfo().Assembly;
@@ -1910,7 +1894,6 @@ namespace Emby.Server.Implementations
                 HasUpdateAvailable = HasUpdateAvailable,
                 SupportsAutoRunAtStartup = SupportsAutoRunAtStartup,
                 TranscodingTempPath = ApplicationPaths.TranscodingTempPath,
-                SupportsRunningAsService = SupportsRunningAsService,
                 ServerName = FriendlyName,
                 LocalAddress = localAddress,
                 SupportsLibraryMonitor = true,

+ 0 - 9
Emby.Server.Implementations/EntryPoints/SystemEvents.cs

@@ -23,18 +23,9 @@ namespace Emby.Server.Implementations.EntryPoints
 
         public void Run()
         {
-            _systemEvents.SessionLogoff += _systemEvents_SessionLogoff;
             _systemEvents.SystemShutdown += _systemEvents_SystemShutdown;
         }
 
-        private void _systemEvents_SessionLogoff(object sender, EventArgs e)
-        {
-            if (!_appHost.IsRunningAsService)
-            {
-                _appHost.Shutdown();
-            }
-        }
-
         private void _systemEvents_SystemShutdown(object sender, EventArgs e)
         {
             _appHost.Shutdown();

+ 1 - 5
MediaBrowser.Api/StartupWizardService.cs

@@ -67,13 +67,10 @@ namespace MediaBrowser.Api
             _config.SaveConfiguration();
         }
 
-        public async Task<object> Get(GetStartupInfo request)
+        public object Get(GetStartupInfo request)
         {
-            var info = await _appHost.GetSystemInfo().ConfigureAwait(false);
-
             return new StartupInfo
             {
-                SupportsRunningAsService = info.SupportsRunningAsService,
                 HasMediaEncoder = !string.IsNullOrWhiteSpace(_mediaEncoder.EncoderPath)
             };
         }
@@ -152,7 +149,6 @@ namespace MediaBrowser.Api
 
     public class StartupInfo
     {
-        public bool SupportsRunningAsService { get; set; }
         public bool HasMediaEncoder { get; set; }
     }
 

+ 0 - 6
MediaBrowser.Controller/IServerApplicationHost.cs

@@ -21,12 +21,6 @@ namespace MediaBrowser.Controller
         /// <returns>SystemInfo.</returns>
         Task<SystemInfo> GetSystemInfo();
 
-        /// <summary>
-        /// Gets a value indicating whether this instance is running as service.
-        /// </summary>
-        /// <value><c>true</c> if this instance is running as service; otherwise, <c>false</c>.</value>
-        bool IsRunningAsService { get; }
-
         /// <summary>
         /// Gets a value indicating whether [supports automatic run at startup].
         /// </summary>

+ 0 - 6
MediaBrowser.Model/System/SystemInfo.cs

@@ -16,12 +16,6 @@ namespace MediaBrowser.Model.System
         /// <value>The display name of the operating system.</value>
         public string OperatingSystemDisplayName { get; set; }
 
-        /// <summary>
-        /// Gets or sets a value indicating whether [supports running as service].
-        /// </summary>
-        /// <value><c>true</c> if [supports running as service]; otherwise, <c>false</c>.</value>
-        public bool SupportsRunningAsService { get; set; }
-
         /// <summary>
         /// Gets or sets the mac address.
         /// </summary>

+ 0 - 13
MediaBrowser.ServerApplication/WindowsAppHost.cs

@@ -31,11 +31,6 @@ namespace MediaBrowser.ServerApplication
             fileSystem.AddShortcutHandler(new LnkShortcutHandler());
         }
 
-        public override bool IsRunningAsService
-        {
-            get { return MainStartup.IsRunningAsService; }
-        }
-
         protected override IConnectManager CreateConnectManager()
         {
             return new ConnectManager();
@@ -111,14 +106,6 @@ namespace MediaBrowser.ServerApplication
             }
         }
 
-        public override bool SupportsRunningAsService
-        {
-            get
-            {
-                return true;
-            }
-        }
-
         public override bool CanSelfRestart
         {
             get

+ 1 - 1
SharedVersion.cs

@@ -1,3 +1,3 @@
 using System.Reflection;
 
-[assembly: AssemblyVersion("3.2.30.15")]
+[assembly: AssemblyVersion("3.2.30.16")]