add startup error handling

This commit is contained in:
Luke Pulverenti
2016-06-30 00:23:52 -04:00
parent cbeb77c0ad
commit 525f780453
8 changed files with 39 additions and 37 deletions

View File

@@ -132,7 +132,20 @@ namespace MediaBrowser.MediaEncoding.Encoder
return false;
}
public void Init()
public async Task Init()
{
InitPaths();
if (!string.IsNullOrWhiteSpace(FFMpegPath))
{
var result = new EncoderValidator(_logger).Validate(FFMpegPath);
SetAvailableDecoders(result.Item1);
SetAvailableEncoders(result.Item2);
}
}
private void InitPaths()
{
ConfigureEncoderPaths();