aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Program.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2019-03-12 16:37:18 +0100
committerGitHub <noreply@github.com>2019-03-12 16:37:18 +0100
commit3ddbda9aca3be9bf24a1c0c1f0052e5d9e35b7d8 (patch)
treecd92d645dea415bd148c344afccbdaa62316866f /Jellyfin.Server/Program.cs
parentffd6dac03a94bb99387e84b447aa22ca92cf9465 (diff)
parent1fef8bf266480dc41cdf7ab80d1deac54dedad3d (diff)
Merge branch 'master' into xml
Diffstat (limited to 'Jellyfin.Server/Program.cs')
-rw-r--r--Jellyfin.Server/Program.cs12
1 files changed, 5 insertions, 7 deletions
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index 41ee73a56..fa4b7b8e5 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -20,6 +20,7 @@ using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Drawing;
using MediaBrowser.Model.Globalization;
using MediaBrowser.Model.IO;
+using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
@@ -124,7 +125,7 @@ namespace Jellyfin.Server
SQLitePCL.Batteries_V2.Init();
// Allow all https requests
- ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; } );
+ ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; });
var fileSystem = new ManagedFileSystem(_loggerFactory, environmentInfo, appPaths);
@@ -144,8 +145,6 @@ namespace Jellyfin.Server
await appHost.RunStartupTasks().ConfigureAwait(false);
- // TODO: read input for a stop command
-
try
{
// Block main thread until shutdown
@@ -175,7 +174,7 @@ namespace Jellyfin.Server
{
// dataDir
// IF --datadir
- // ELSE IF $JELLYFIN_DATA_PATH
+ // ELSE IF $JELLYFIN_DATA_DIR
// ELSE IF windows, use <%APPDATA%>/jellyfin
// ELSE IF $XDG_DATA_HOME then use $XDG_DATA_HOME/jellyfin
// ELSE use $HOME/.local/share/jellyfin
@@ -183,7 +182,7 @@ namespace Jellyfin.Server
if (string.IsNullOrEmpty(dataDir))
{
- dataDir = Environment.GetEnvironmentVariable("JELLYFIN_DATA_PATH");
+ dataDir = Environment.GetEnvironmentVariable("JELLYFIN_DATA_DIR");
if (string.IsNullOrEmpty(dataDir))
{
@@ -192,8 +191,6 @@ namespace Jellyfin.Server
}
}
- Directory.CreateDirectory(dataDir);
-
// configDir
// IF --configdir
// ELSE IF $JELLYFIN_CONFIG_DIR
@@ -286,6 +283,7 @@ namespace Jellyfin.Server
// Ensure the main folders exist before we continue
try
{
+ Directory.CreateDirectory(dataDir);
Directory.CreateDirectory(logDir);
Directory.CreateDirectory(configDir);
Directory.CreateDirectory(cacheDir);