Revert back to NoAutoRunWebApp

Addressed further review comments.  Removed unnecessary .ParsedStartupOptions namespace.  Removed DataDir, ConfigDir and LogDir from Interface file as not necessary.
pull/746/head
PloughPuff 6 years ago committed by Bond-009
parent e18b89ca27
commit 211ae30188

@ -43,7 +43,6 @@ using Emby.Server.Implementations.ScheduledTasks;
using Emby.Server.Implementations.Security; using Emby.Server.Implementations.Security;
using Emby.Server.Implementations.Serialization; using Emby.Server.Implementations.Serialization;
using Emby.Server.Implementations.Session; using Emby.Server.Implementations.Session;
using Emby.Server.Implementations.ParsedStartupOptions;
using Emby.Server.Implementations.Threading; using Emby.Server.Implementations.Threading;
using Emby.Server.Implementations.TV; using Emby.Server.Implementations.TV;
using Emby.Server.Implementations.Updates; using Emby.Server.Implementations.Updates;

@ -47,7 +47,7 @@ namespace Emby.Server.Implementations.EntryPoints
{ {
var options = ((ApplicationHost)_appHost).StartupOptions; var options = ((ApplicationHost)_appHost).StartupOptions;
if (options.AutoRunWebApp) if (!options.NoAutoRunWebApp)
{ {
BrowserLauncher.OpenWebApp(_appHost); BrowserLauncher.OpenWebApp(_appHost);
} }

@ -6,7 +6,6 @@ using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Net; using MediaBrowser.Common.Net;
using MediaBrowser.Model.IO; using MediaBrowser.Model.IO;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Emby.Server.Implementations.ParsedStartupOptions;
namespace Emby.Server.Implementations.FFMpeg namespace Emby.Server.Implementations.FFMpeg
{ {

@ -1,22 +1,7 @@
namespace Emby.Server.Implementations.ParsedStartupOptions namespace Emby.Server.Implementations
{ {
public interface IStartupOptions public interface IStartupOptions
{ {
/// <summary>
/// --datadir
/// </summary>
string DataDir { get; }
/// <summary>
/// --configdir
/// </summary>
string ConfigDir { get; }
/// <summary>
/// --logdir
/// </summary>
string LogDir { get; }
/// <summary> /// <summary>
/// --ffmpeg /// --ffmpeg
/// </summary> /// </summary>
@ -35,7 +20,7 @@ namespace Emby.Server.Implementations.ParsedStartupOptions
/// <summary> /// <summary>
/// --noautorunwebapp /// --noautorunwebapp
/// </summary> /// </summary>
bool AutoRunWebApp { get; } bool NoAutoRunWebApp { get; }
/// <summary> /// <summary>
/// --package-name /// --package-name

@ -1,5 +1,5 @@
using CommandLine; using CommandLine;
using Emby.Server.Implementations.ParsedStartupOptions; using Emby.Server.Implementations;
namespace Jellyfin.Server namespace Jellyfin.Server
{ {
@ -27,7 +27,7 @@ namespace Jellyfin.Server
public bool IsService { get; set; } public bool IsService { get; set; }
[Option("noautorunwebapp", Required = false, HelpText = "Run headless if startup wizard is complete.")] [Option("noautorunwebapp", Required = false, HelpText = "Run headless if startup wizard is complete.")]
public bool AutoRunWebApp { get => !NoautoRunWebApp; set => NoautoRunWebApp = value; } public bool NoAutoRunWebApp { get; set; }
[Option("package-name", Required = false, HelpText = "Used when packaging Jellyfin (example, synology).")] [Option("package-name", Required = false, HelpText = "Used when packaging Jellyfin (example, synology).")]
public string PackageName { get; set; } public string PackageName { get; set; }
@ -37,11 +37,5 @@ namespace Jellyfin.Server
[Option("restartargs", Required = false, HelpText = "Arguments for restart script.")] [Option("restartargs", Required = false, HelpText = "Arguments for restart script.")]
public string RestartArgs { get; set; } public string RestartArgs { get; set; }
/// <summary>
/// Gets or sets a value indicating whether to run not run the web app.
/// Command line switch is --noautorunwebapp, which we store privately here, but provide inverse (AutoRunWebApp) for users.
/// </summary>
private bool NoautoRunWebApp { get; set; }
} }
} }

Loading…
Cancel
Save