diff options
| author | PloughPuff <ploughpuff@protonmail.com> | 2019-01-29 13:34:59 +0000 |
|---|---|---|
| committer | Bond-009 <bond.009@outlook.com> | 2019-01-31 18:56:34 +0100 |
| commit | b5e8cce4cfb5356ca3f46d2cde66b5d0d4084f4d (patch) | |
| tree | ecd2035280244c188e3c8075e97f099671824bf2 /Jellyfin.Server | |
| parent | 211ae30188546e9c652b68b609ab6266ab42a49d (diff) | |
Improved help text and output errors to stderr
Addressed review comments from JustAMan.
Diffstat (limited to 'Jellyfin.Server')
| -rw-r--r-- | Jellyfin.Server/Program.cs | 5 | ||||
| -rw-r--r-- | Jellyfin.Server/StartupOptions.cs | 10 |
2 files changed, 6 insertions, 9 deletions
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs index 905cf3aa0..2f1828336 100644 --- a/Jellyfin.Server/Program.cs +++ b/Jellyfin.Server/Program.cs @@ -49,11 +49,8 @@ namespace Jellyfin.Server args[i] = regex.Replace(args[i], substitution); } - // For CommandLine package, change default behaviour to output errors to stdout (instead of stderr) - var parser = new Parser(config => config.HelpWriter = Console.Out); - // Parse the command line arguments and either start the app or exit indicating error - await parser.ParseArguments<StartupOptions>(args) + await Parser.Default.ParseArguments<StartupOptions>(args) .MapResult( options => StartApp(options), errs => Task.FromResult(0)).ConfigureAwait(false); diff --git a/Jellyfin.Server/StartupOptions.cs b/Jellyfin.Server/StartupOptions.cs index a1bdb756e..6e6b61725 100644 --- a/Jellyfin.Server/StartupOptions.cs +++ b/Jellyfin.Server/StartupOptions.cs @@ -8,19 +8,19 @@ namespace Jellyfin.Server /// </summary> public class StartupOptions : IStartupOptions { - [Option('d', "datadir", Required = false, HelpText = "Path to use for the data folder (databases files etc.).")] + [Option('d', "datadir", Required = false, HelpText = "Path to use for the data folder (database files, etc.).")] public string DataDir { get; set; } - [Option('c', "configdir", Required = false, HelpText = "Path to use for config data (user policies and puctures).")] + [Option('c', "configdir", Required = false, HelpText = "Path to use for configuration data (user settings and pictures).")] public string ConfigDir { get; set; } [Option('l', "logdir", Required = false, HelpText = "Path to use for writing log files.")] public string LogDir { get; set; } - [Option("ffmpeg", Required = false, HelpText = "Path to external FFmpeg exe to use in place of built-in.")] + [Option("ffmpeg", Required = false, HelpText = "Path to external FFmpeg executable to use in place of default found in PATH. Must be specified along with --ffprobe.")] public string FFmpegPath { get; set; } - [Option("ffprobe", Required = false, HelpText = "ffmpeg and ffprobe switches must be supplied together.")] + [Option("ffprobe", Required = false, HelpText = "Path to external FFprobe executable to use in place of default found in PATH. Must be specified along with --ffmpeg.")] public string FFprobePath { get; set; } [Option("service", Required = false, HelpText = "Run as headless service.")] @@ -32,7 +32,7 @@ namespace Jellyfin.Server [Option("package-name", Required = false, HelpText = "Used when packaging Jellyfin (example, synology).")] public string PackageName { get; set; } - [Option("restartpath", Required = false, HelpText = "Path to reset script.")] + [Option("restartpath", Required = false, HelpText = "Path to restart script.")] public string RestartPath { get; set; } [Option("restartargs", Required = false, HelpText = "Arguments for restart script.")] |
