aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Program.cs
diff options
context:
space:
mode:
authorAndrew Rabert <6550543+nvllsvm@users.noreply.github.com>2019-01-24 23:03:54 -0500
committerGitHub <noreply@github.com>2019-01-24 23:03:54 -0500
commitb4fdfb562dada77ff6d9c75bbc9e5e5b3ee977a2 (patch)
treecafeb8316e0120f052eb094e44a02e94639fc223 /Jellyfin.Server/Program.cs
parent15806de2aad07a4b4c799a0ee56d770dd5248543 (diff)
parent48ad18d12baeeb42ec0ec7df9473330dcbc76754 (diff)
Merge pull request #700 from jellyfin/dev
Dev sync
Diffstat (limited to 'Jellyfin.Server/Program.cs')
-rw-r--r--Jellyfin.Server/Program.cs14
1 files changed, 5 insertions, 9 deletions
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index 0510548b5..fef7de512 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -99,7 +99,7 @@ namespace Jellyfin.Server
new SystemEvents(),
new NetworkManager(_loggerFactory, environmentInfo)))
{
- appHost.Init();
+ await appHost.InitAsync();
appHost.ImageProcessor.ImageEncoder = GetImageEncoder(fileSystem, appPaths, appHost.LocalizationManager);
@@ -108,7 +108,6 @@ namespace Jellyfin.Server
await appHost.RunStartupTasks();
// TODO: read input for a stop command
-
try
{
// Block main thread until shutdown
@@ -167,7 +166,6 @@ namespace Jellyfin.Server
{
Directory.CreateDirectory(programDataPath);
}
-
string configDir = Environment.GetEnvironmentVariable("JELLYFIN_CONFIG_DIR");
if (string.IsNullOrEmpty(configDir))
{
@@ -224,7 +222,7 @@ namespace Jellyfin.Server
.GetManifestResourceStream("Jellyfin.Server.Resources.Configuration.logging.json"))
using (Stream fstr = File.Open(configPath, FileMode.CreateNew))
{
- await rscstr.CopyToAsync(fstr);
+ await rscstr.CopyToAsync(fstr).ConfigureAwait(false);
}
}
var configuration = new ConfigurationBuilder()
@@ -334,11 +332,9 @@ namespace Jellyfin.Server
}
else
{
- commandLineArgsString = string.Join(" ",
- Environment.GetCommandLineArgs()
- .Skip(1)
- .Select(NormalizeCommandLineArgument)
- );
+ commandLineArgsString = string.Join(
+ " ",
+ Environment.GetCommandLineArgs().Skip(1).Select(NormalizeCommandLineArgument));
}
_logger.LogInformation("Executable: {0}", module);