Merge pull request #437 from cvium/remove_run_at_startup

Remove AutoRunAtStartup
This commit is contained in:
Andrew Rabert 2019-01-06 18:31:20 -05:00 committed by GitHub
commit edfc3cb8c6
4 changed files with 0 additions and 63 deletions

View File

@ -500,14 +500,6 @@ namespace Emby.Server.Implementations
return new StreamHelper(); return new StreamHelper();
} }
public virtual bool SupportsAutoRunAtStartup
{
get
{
return EnvironmentInfo.OperatingSystem == MediaBrowser.Model.System.OperatingSystem.Windows;
}
}
/// <summary> /// <summary>
/// Creates an instance of type and resolves all constructor dependancies /// Creates an instance of type and resolves all constructor dependancies
/// </summary> /// </summary>
@ -688,8 +680,6 @@ namespace Emby.Server.Implementations
{ {
Resolve<ITaskManager>().AddTasks(GetExports<IScheduledTask>(false)); Resolve<ITaskManager>().AddTasks(GetExports<IScheduledTask>(false));
ConfigureAutorun();
ConfigurationManager.ConfigurationUpdated += OnConfigurationUpdated; ConfigurationManager.ConfigurationUpdated += OnConfigurationUpdated;
MediaEncoder.Init(); MediaEncoder.Init();
@ -743,21 +733,6 @@ namespace Emby.Server.Implementations
} }
} }
/// <summary>
/// Configures the autorun.
/// </summary>
private void ConfigureAutorun()
{
try
{
ConfigureAutoRunAtStartup(ConfigurationManager.CommonConfiguration.RunAtStartup);
}
catch (Exception ex)
{
Logger.LogError(ex, "Error configuring autorun");
}
}
private IJsonSerializer CreateJsonSerializer() private IJsonSerializer CreateJsonSerializer()
{ {
return new JsonSerializer(FileSystemManager, LoggerFactory.CreateLogger("JsonSerializer")); return new JsonSerializer(FileSystemManager, LoggerFactory.CreateLogger("JsonSerializer"));
@ -1567,8 +1542,6 @@ namespace Emby.Server.Implementations
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
protected void OnConfigurationUpdated(object sender, EventArgs e) protected void OnConfigurationUpdated(object sender, EventArgs e)
{ {
ConfigureAutorun();
var requiresRestart = false; var requiresRestart = false;
// Don't do anything if these haven't been set yet // Don't do anything if these haven't been set yet
@ -1919,7 +1892,6 @@ namespace Emby.Server.Implementations
CanLaunchWebBrowser = CanLaunchWebBrowser, CanLaunchWebBrowser = CanLaunchWebBrowser,
WanAddress = wanAddress, WanAddress = wanAddress,
HasUpdateAvailable = HasUpdateAvailable, HasUpdateAvailable = HasUpdateAvailable,
SupportsAutoRunAtStartup = SupportsAutoRunAtStartup,
TranscodingTempPath = ApplicationPaths.TranscodingTempPath, TranscodingTempPath = ApplicationPaths.TranscodingTempPath,
ServerName = FriendlyName, ServerName = FriendlyName,
LocalAddress = localAddress, LocalAddress = localAddress,
@ -2246,23 +2218,6 @@ namespace Emby.Server.Implementations
OnApplicationUpdated(package); OnApplicationUpdated(package);
} }
/// <summary>
/// Configures the automatic run at startup.
/// </summary>
/// <param name="autorun">if set to <c>true</c> [autorun].</param>
protected void ConfigureAutoRunAtStartup(bool autorun)
{
if (SupportsAutoRunAtStartup)
{
ConfigureAutoRunInternal(autorun);
}
}
protected virtual void ConfigureAutoRunInternal(bool autorun)
{
throw new NotImplementedException();
}
/// <summary> /// <summary>
/// This returns localhost in the case of no external dns, and the hostname if the /// This returns localhost in the case of no external dns, and the hostname if the
/// dns is prefixed with a valid Uri prefix. /// dns is prefixed with a valid Uri prefix.

View File

@ -24,12 +24,6 @@ namespace MediaBrowser.Controller
Task<PublicSystemInfo> GetPublicSystemInfo(CancellationToken cancellationToken); Task<PublicSystemInfo> GetPublicSystemInfo(CancellationToken cancellationToken);
/// <summary>
/// Gets a value indicating whether [supports automatic run at startup].
/// </summary>
/// <value><c>true</c> if [supports automatic run at startup]; otherwise, <c>false</c>.</value>
bool SupportsAutoRunAtStartup { get; }
bool CanLaunchWebBrowser { get; } bool CanLaunchWebBrowser { get; }
/// <summary> /// <summary>

View File

@ -29,12 +29,6 @@ namespace MediaBrowser.Model.Configuration
/// <value>The log file retention days.</value> /// <value>The log file retention days.</value>
public int LogFileRetentionDays { get; set; } public int LogFileRetentionDays { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [run at startup].
/// </summary>
/// <value><c>true</c> if [run at startup]; otherwise, <c>false</c>.</value>
public bool RunAtStartup { get; set; }
/// <summary> /// <summary>
/// Gets or sets a value indicating whether this instance is first run. /// Gets or sets a value indicating whether this instance is first run.
/// </summary> /// </summary>

View File

@ -118,12 +118,6 @@ namespace MediaBrowser.Model.System
/// <value><c>true</c> if this instance has update available; otherwise, <c>false</c>.</value> /// <value><c>true</c> if this instance has update available; otherwise, <c>false</c>.</value>
public bool HasUpdateAvailable { get; set; } public bool HasUpdateAvailable { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [supports automatic run at startup].
/// </summary>
/// <value><c>true</c> if [supports automatic run at startup]; otherwise, <c>false</c>.</value>
public bool SupportsAutoRunAtStartup { get; set; }
public string EncoderLocationType { get; set; } public string EncoderLocationType { get; set; }
public Architecture SystemArchitecture { get; set; } public Architecture SystemArchitecture { get; set; }