From 660f6174b32268edf7b9bdb4441eef83b187daaf Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Fri, 1 Feb 2019 18:15:35 +0100 Subject: [PATCH] Rebase on master --- Jellyfin.Server/Program.cs | 4 ++-- Jellyfin.Server/StartupOptions.cs | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs index e0d5ed6239..5c8608a928 100644 --- a/Jellyfin.Server/Program.cs +++ b/Jellyfin.Server/Program.cs @@ -205,9 +205,9 @@ namespace Jellyfin.Server string cacheDir = Environment.GetEnvironmentVariable("JELLYFIN_CACHE_DIR"); if (string.IsNullOrEmpty(cacheDir)) { - if (options.ContainsOption("-cachedir")) + if (options.CacheDir != null) { - cacheDir = options.GetOption("-cachedir"); + cacheDir = options.CacheDir; } else if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { diff --git a/Jellyfin.Server/StartupOptions.cs b/Jellyfin.Server/StartupOptions.cs index 6e6b617251..4908d86ed6 100644 --- a/Jellyfin.Server/StartupOptions.cs +++ b/Jellyfin.Server/StartupOptions.cs @@ -11,6 +11,9 @@ namespace Jellyfin.Server [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 caching.")] + public string CacheDir { get; set; } + [Option('c', "configdir", Required = false, HelpText = "Path to use for configuration data (user settings and pictures).")] public string ConfigDir { get; set; }