From bb879fff33ddc40bc15b025c3e7449c7becb2d46 Mon Sep 17 00:00:00 2001 From: cvium Date: Sat, 5 Jan 2019 23:07:06 +0100 Subject: [PATCH] Remove AutoRunAtStartup --- .../ApplicationHost.cs | 45 ------------------- .../IServerApplicationHost.cs | 6 --- .../BaseApplicationConfiguration.cs | 6 --- MediaBrowser.Model/System/SystemInfo.cs | 6 --- 4 files changed, 63 deletions(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 2368519685..63dc01f64d 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -506,14 +506,6 @@ namespace Emby.Server.Implementations return new StreamHelper(); } - public virtual bool SupportsAutoRunAtStartup - { - get - { - return EnvironmentInfo.OperatingSystem == MediaBrowser.Model.System.OperatingSystem.Windows; - } - } - /// /// Creates an instance of type and resolves all constructor dependancies /// @@ -706,8 +698,6 @@ namespace Emby.Server.Implementations { Resolve().AddTasks(GetExports(false)); - ConfigureAutorun(); - ConfigurationManager.ConfigurationUpdated += OnConfigurationUpdated; MediaEncoder.Init(); @@ -763,21 +753,6 @@ namespace Emby.Server.Implementations } } - /// - /// Configures the autorun. - /// - private void ConfigureAutorun() - { - try - { - ConfigureAutoRunAtStartup(ConfigurationManager.CommonConfiguration.RunAtStartup); - } - catch (Exception ex) - { - Logger.LogError(ex, "Error configuring autorun"); - } - } - private IJsonSerializer CreateJsonSerializer() { return new JsonSerializer(FileSystemManager, LoggerFactory.CreateLogger("JsonSerializer")); @@ -1591,8 +1566,6 @@ namespace Emby.Server.Implementations /// The instance containing the event data. protected void OnConfigurationUpdated(object sender, EventArgs e) { - ConfigureAutorun(); - var requiresRestart = false; // Don't do anything if these haven't been set yet @@ -1943,7 +1916,6 @@ namespace Emby.Server.Implementations CanLaunchWebBrowser = CanLaunchWebBrowser, WanAddress = wanAddress, HasUpdateAvailable = HasUpdateAvailable, - SupportsAutoRunAtStartup = SupportsAutoRunAtStartup, TranscodingTempPath = ApplicationPaths.TranscodingTempPath, ServerName = FriendlyName, LocalAddress = localAddress, @@ -2296,23 +2268,6 @@ namespace Emby.Server.Implementations OnApplicationUpdated(package); } - /// - /// Configures the automatic run at startup. - /// - /// if set to true [autorun]. - protected void ConfigureAutoRunAtStartup(bool autorun) - { - if (SupportsAutoRunAtStartup) - { - ConfigureAutoRunInternal(autorun); - } - } - - protected virtual void ConfigureAutoRunInternal(bool autorun) - { - throw new NotImplementedException(); - } - /// /// This returns localhost in the case of no external dns, and the hostname if the /// dns is prefixed with a valid Uri prefix. diff --git a/MediaBrowser.Controller/IServerApplicationHost.cs b/MediaBrowser.Controller/IServerApplicationHost.cs index 830c160e34..4dc5590312 100644 --- a/MediaBrowser.Controller/IServerApplicationHost.cs +++ b/MediaBrowser.Controller/IServerApplicationHost.cs @@ -24,12 +24,6 @@ namespace MediaBrowser.Controller Task GetPublicSystemInfo(CancellationToken cancellationToken); - /// - /// Gets a value indicating whether [supports automatic run at startup]. - /// - /// true if [supports automatic run at startup]; otherwise, false. - bool SupportsAutoRunAtStartup { get; } - bool CanLaunchWebBrowser { get; } /// diff --git a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs index f84735bed6..08bf2379f6 100644 --- a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs +++ b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs @@ -29,12 +29,6 @@ namespace MediaBrowser.Model.Configuration /// The log file retention days. public int LogFileRetentionDays { get; set; } - /// - /// Gets or sets a value indicating whether [run at startup]. - /// - /// true if [run at startup]; otherwise, false. - public bool RunAtStartup { get; set; } - /// /// Gets or sets a value indicating whether this instance is first run. /// diff --git a/MediaBrowser.Model/System/SystemInfo.cs b/MediaBrowser.Model/System/SystemInfo.cs index 031222b751..a63ce5e66c 100644 --- a/MediaBrowser.Model/System/SystemInfo.cs +++ b/MediaBrowser.Model/System/SystemInfo.cs @@ -118,12 +118,6 @@ namespace MediaBrowser.Model.System /// true if this instance has update available; otherwise, false. public bool HasUpdateAvailable { get; set; } - /// - /// Gets or sets a value indicating whether [supports automatic run at startup]. - /// - /// true if [supports automatic run at startup]; otherwise, false. - public bool SupportsAutoRunAtStartup { get; set; } - public string EncoderLocationType { get; set; } public Architecture SystemArchitecture { get; set; }