mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-17 22:43:07 +03:00
Created IConfigurationManager
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using MediaBrowser.Common.Kernel;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Common.Kernel;
|
||||
using MediaBrowser.Common.ScheduledTasks;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using System;
|
||||
@@ -19,27 +20,35 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
|
||||
private readonly IApplicationHost _appHost;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the kernel.
|
||||
/// Gets or sets the configuration manager.
|
||||
/// </summary>
|
||||
/// <value>The kernel.</value>
|
||||
private IKernel Kernel { get; set; }
|
||||
/// <value>The configuration manager.</value>
|
||||
private IConfigurationManager ConfigurationManager { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the logger.
|
||||
/// </summary>
|
||||
/// <value>The logger.</value>
|
||||
private ILogger Logger { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the kernel.
|
||||
/// </summary>
|
||||
/// <value>The kernel.</value>
|
||||
private IKernel Kernel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SystemUpdateTask" /> class.
|
||||
/// </summary>
|
||||
/// <param name="appHost">The app host.</param>
|
||||
/// <param name="kernel">The kernel.</param>
|
||||
/// <param name="configurationManager">The configuration manager.</param>
|
||||
/// <param name="logger">The logger.</param>
|
||||
public SystemUpdateTask(IApplicationHost appHost, IKernel kernel, ILogger logger)
|
||||
/// <param name="kernel">The kernel.</param>
|
||||
public SystemUpdateTask(IApplicationHost appHost, IConfigurationManager configurationManager, ILogger logger, IKernel kernel)
|
||||
{
|
||||
_appHost = appHost;
|
||||
Kernel = kernel;
|
||||
ConfigurationManager = configurationManager;
|
||||
Logger = logger;
|
||||
Kernel = kernel;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -88,7 +97,7 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
|
||||
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
if (Kernel.Configuration.EnableAutoUpdate)
|
||||
if (ConfigurationManager.CommonConfiguration.EnableAutoUpdate)
|
||||
{
|
||||
Logger.Info("Update Revision {0} available. Updating...", updateInfo.AvailableVersion);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user