Fix NullReferenceException at startup

This commit is contained in:
ferferga 2020-03-26 22:26:25 +01:00
parent 105fc3dc29
commit 28f07df657
7 changed files with 23 additions and 7 deletions

View File

@ -45,7 +45,14 @@ namespace Emby.Server.Implementations.ScheduledTasks
/// <summary>
/// Initializes a new instance of the <see cref="ChapterImagesTask" /> class.
/// </summary>
public ChapterImagesTask(ILoggerFactory loggerFactory, ILibraryManager libraryManager, IItemRepository itemRepo, IApplicationPaths appPaths, IEncodingManager encodingManager, IFileSystem fileSystem)
public ChapterImagesTask(
ILoggerFactory loggerFactory,
ILibraryManager libraryManager,
IItemRepository itemRepo,
IApplicationPaths appPaths,
IEncodingManager encodingManager,
IFileSystem fileSystem,
ILocalizationManager localization)
{
_logger = loggerFactory.CreateLogger(GetType().Name);
_libraryManager = libraryManager;
@ -53,6 +60,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
_appPaths = appPaths;
_encodingManager = encodingManager;
_fileSystem = fileSystem;
_localization = localization;
}
/// <summary>

View File

@ -34,11 +34,13 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
public DeleteCacheFileTask(
IApplicationPaths appPaths,
ILogger<DeleteCacheFileTask> logger,
IFileSystem fileSystem)
IFileSystem fileSystem,
ILocalizationManager localization)
{
ApplicationPaths = appPaths;
_logger = logger;
_fileSystem = fileSystem;
_localization = localization;
}
/// <summary>

View File

@ -28,10 +28,11 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
/// Initializes a new instance of the <see cref="DeleteLogFileTask" /> class.
/// </summary>
/// <param name="configurationManager">The configuration manager.</param>
public DeleteLogFileTask(IConfigurationManager configurationManager, IFileSystem fileSystem)
public DeleteLogFileTask(IConfigurationManager configurationManager, IFileSystem fileSystem, ILocalizationManager localization)
{
ConfigurationManager = configurationManager;
_fileSystem = fileSystem;
_localization = localization;
}
/// <summary>

View File

@ -28,11 +28,13 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
public DeleteTranscodeFileTask(
ILogger<DeleteTranscodeFileTask> logger,
IFileSystem fileSystem,
IConfigurationManager configurationManager)
IConfigurationManager configurationManager,
ILocalizationManager localization)
{
_logger = logger;
_fileSystem = fileSystem;
_configurationManager = configurationManager;
_localization = localization;
}
/// <summary>

View File

@ -27,10 +27,11 @@ namespace Emby.Server.Implementations.ScheduledTasks
/// </summary>
/// <param name="libraryManager">The library manager.</param>
/// <param name="appHost">The server application host</param>
public PeopleValidationTask(ILibraryManager libraryManager, IServerApplicationHost appHost)
public PeopleValidationTask(ILibraryManager libraryManager, IServerApplicationHost appHost, ILocalizationManager localization)
{
_libraryManager = libraryManager;
_appHost = appHost;
_localization = localization;
}
/// <summary>

View File

@ -25,10 +25,11 @@ namespace Emby.Server.Implementations.ScheduledTasks
private readonly IInstallationManager _installationManager;
private readonly ILocalizationManager _localization;
public PluginUpdateTask(ILogger<PluginUpdateTask> logger, IInstallationManager installationManager)
public PluginUpdateTask(ILogger<PluginUpdateTask> logger, IInstallationManager installationManager, ILocalizationManager localization)
{
_logger = logger;
_installationManager = installationManager;
_localization = localization;
}
/// <summary>

View File

@ -26,10 +26,11 @@ namespace Emby.Server.Implementations.ScheduledTasks
/// Initializes a new instance of the <see cref="RefreshMediaLibraryTask" /> class.
/// </summary>
/// <param name="libraryManager">The library manager.</param>
public RefreshMediaLibraryTask(ILibraryManager libraryManager, IServerConfigurationManager config)
public RefreshMediaLibraryTask(ILibraryManager libraryManager, IServerConfigurationManager config, ILocalizationManager localization)
{
_libraryManager = libraryManager;
_config = config;
_localization = localization;
}
/// <summary>