|
|
|
@ -709,7 +709,7 @@ namespace Emby.Server.Implementations
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Init()
|
|
|
|
|
public async Task Init()
|
|
|
|
|
{
|
|
|
|
|
HttpPort = ServerConfigurationManager.Configuration.HttpServerPortNumber;
|
|
|
|
|
HttpsPort = ServerConfigurationManager.Configuration.HttpsPortNumber;
|
|
|
|
@ -739,7 +739,7 @@ namespace Emby.Server.Implementations
|
|
|
|
|
|
|
|
|
|
SetHttpLimit();
|
|
|
|
|
|
|
|
|
|
RegisterResources();
|
|
|
|
|
await RegisterResources();
|
|
|
|
|
|
|
|
|
|
FindParts();
|
|
|
|
|
}
|
|
|
|
@ -754,7 +754,7 @@ namespace Emby.Server.Implementations
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Registers resources that classes will depend on
|
|
|
|
|
/// </summary>
|
|
|
|
|
protected void RegisterResources()
|
|
|
|
|
protected async Task RegisterResources()
|
|
|
|
|
{
|
|
|
|
|
RegisterSingleInstance(ConfigurationManager);
|
|
|
|
|
RegisterSingleInstance<IApplicationHost>(this);
|
|
|
|
@ -931,7 +931,7 @@ namespace Emby.Server.Implementations
|
|
|
|
|
EncodingManager = new MediaEncoder.EncodingManager(FileSystemManager, LoggerFactory, MediaEncoder, ChapterManager, LibraryManager);
|
|
|
|
|
RegisterSingleInstance(EncodingManager);
|
|
|
|
|
|
|
|
|
|
var activityLogRepo = GetActivityLogRepository();
|
|
|
|
|
var activityLogRepo = await GetActivityLogRepository();
|
|
|
|
|
RegisterSingleInstance(activityLogRepo);
|
|
|
|
|
RegisterSingleInstance<IActivityManager>(new ActivityManager(LoggerFactory, activityLogRepo, UserManager));
|
|
|
|
|
|
|
|
|
@ -1146,9 +1146,13 @@ namespace Emby.Server.Implementations
|
|
|
|
|
return repo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private IActivityRepository GetActivityLogRepository()
|
|
|
|
|
private async Task<IActivityRepository> GetActivityLogRepository()
|
|
|
|
|
{
|
|
|
|
|
return new ActivityRepository(ServerConfigurationManager.ApplicationPaths.DataPath);
|
|
|
|
|
var repo = new ActivityRepository(ServerConfigurationManager.ApplicationPaths.DataPath);
|
|
|
|
|
|
|
|
|
|
await repo.Database.EnsureCreatedAsync();
|
|
|
|
|
|
|
|
|
|
return repo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|