浏览代码

Fix NullReferenceException at startup

ferferga 5 年之前
父节点
当前提交
28f07df657

+ 9 - 1
Emby.Server.Implementations/ScheduledTasks/Tasks/ChapterImagesTask.cs

@@ -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>

+ 3 - 1
Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs

@@ -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>

+ 2 - 1
Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs

@@ -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>

+ 3 - 1
Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs

@@ -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>

+ 2 - 1
Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs

@@ -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>

+ 2 - 1
Emby.Server.Implementations/ScheduledTasks/Tasks/PluginUpdateTask.cs

@@ -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>

+ 2 - 1
Emby.Server.Implementations/ScheduledTasks/Tasks/RefreshMediaLibraryTask.cs

@@ -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>