|
|
@ -439,7 +439,7 @@ namespace MediaBrowser.Server.Startup.Common
|
|
|
|
var innerProgress = new ActionableProgress<double>();
|
|
|
|
var innerProgress = new ActionableProgress<double>();
|
|
|
|
innerProgress.RegisterAction(p => progress.Report((.75 * p) + 15));
|
|
|
|
innerProgress.RegisterAction(p => progress.Report((.75 * p) + 15));
|
|
|
|
|
|
|
|
|
|
|
|
ImageProcessor = new ImageProcessor(LogManager.GetLogger("ImageProcessor"), ServerConfigurationManager.ApplicationPaths, FileSystemManager, JsonSerializer, GetImageEncoder());
|
|
|
|
ImageProcessor = GetImageProcessor();
|
|
|
|
RegisterSingleInstance(ImageProcessor);
|
|
|
|
RegisterSingleInstance(ImageProcessor);
|
|
|
|
|
|
|
|
|
|
|
|
TVSeriesManager = new TVSeriesManager(UserManager, UserDataManager, LibraryManager);
|
|
|
|
TVSeriesManager = new TVSeriesManager(UserManager, UserDataManager, LibraryManager);
|
|
|
@ -543,6 +543,18 @@ namespace MediaBrowser.Server.Startup.Common
|
|
|
|
await ((UserManager)UserManager).Initialize().ConfigureAwait(false);
|
|
|
|
await ((UserManager)UserManager).Initialize().ConfigureAwait(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private IImageProcessor GetImageProcessor()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var maxConcurrentImageProcesses = Math.Max(Environment.ProcessorCount, 4);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (_startupOptions.ContainsOption("-imagethreads"))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
int.TryParse(_startupOptions.GetOption("-imagethreads"), NumberStyles.Any, CultureInfo.InvariantCulture, out maxConcurrentImageProcesses);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new ImageProcessor(LogManager.GetLogger("ImageProcessor"), ServerConfigurationManager.ApplicationPaths, FileSystemManager, JsonSerializer, GetImageEncoder(), maxConcurrentImageProcesses);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private IImageEncoder GetImageEncoder()
|
|
|
|
private IImageEncoder GetImageEncoder()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!_startupOptions.ContainsOption("-enablegdi"))
|
|
|
|
if (!_startupOptions.ContainsOption("-enablegdi"))
|
|
|
|