mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 14:03:03 +03:00
add startup error handling
This commit is contained in:
@@ -322,7 +322,7 @@ namespace MediaBrowser.Server.Startup.Common
|
||||
|
||||
await base.RunStartupTasks().ConfigureAwait(false);
|
||||
|
||||
InitMediaEncoder();
|
||||
await MediaEncoder.Init().ConfigureAwait(false);
|
||||
|
||||
Logger.Info("ServerId: {0}", SystemId);
|
||||
Logger.Info("Core startup complete");
|
||||
@@ -350,20 +350,6 @@ namespace MediaBrowser.Server.Startup.Common
|
||||
LogManager.RemoveConsoleOutput();
|
||||
}
|
||||
|
||||
private void InitMediaEncoder()
|
||||
{
|
||||
MediaEncoder.Init();
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
var result = new FFmpegValidator(Logger, ApplicationPaths, FileSystemManager).Validate(MediaEncoder.EncoderPath);
|
||||
|
||||
var mediaEncoder = (MediaEncoder) MediaEncoder;
|
||||
mediaEncoder.SetAvailableDecoders(result.Item1);
|
||||
mediaEncoder.SetAvailableEncoders(result.Item2);
|
||||
});
|
||||
}
|
||||
|
||||
public override Task Init(IProgress<double> progress)
|
||||
{
|
||||
HttpPort = ServerConfigurationManager.Configuration.HttpServerPortNumber;
|
||||
|
||||
Reference in New Issue
Block a user