mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-26 20:14:45 +01:00
Extract IInstallationManager interface
first step to moving update logic to common
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using MediaBrowser.Common.Kernel;
|
||||
using MediaBrowser.Common.Plugins;
|
||||
using MediaBrowser.Common.ScheduledTasks;
|
||||
using MediaBrowser.Common.Updates;
|
||||
using MediaBrowser.Controller.Drawing;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.IO;
|
||||
@@ -70,7 +71,7 @@ namespace MediaBrowser.Controller
|
||||
/// Gets the installation manager.
|
||||
/// </summary>
|
||||
/// <value>The installation manager.</value>
|
||||
public InstallationManager InstallationManager { get; private set; }
|
||||
public IInstallationManager InstallationManager { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the file system manager.
|
||||
|
||||
@@ -3,6 +3,7 @@ using MediaBrowser.Common.Kernel;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Common.Plugins;
|
||||
using MediaBrowser.Common.Progress;
|
||||
using MediaBrowser.Common.Updates;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
@@ -21,18 +22,18 @@ namespace MediaBrowser.Controller.Updates
|
||||
/// <summary>
|
||||
/// Manages all install, uninstall and update operations (both plugins and system)
|
||||
/// </summary>
|
||||
public class InstallationManager : BaseManager<Kernel>
|
||||
public class InstallationManager : BaseManager<Kernel>, IInstallationManager
|
||||
{
|
||||
/// <summary>
|
||||
/// The current installations
|
||||
/// </summary>
|
||||
public readonly List<Tuple<InstallationInfo, CancellationTokenSource>> CurrentInstallations =
|
||||
new List<Tuple<InstallationInfo, CancellationTokenSource>>();
|
||||
public List<Tuple<InstallationInfo, CancellationTokenSource>> CurrentInstallations { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The completed installations
|
||||
/// </summary>
|
||||
public readonly ConcurrentBag<InstallationInfo> CompletedInstallations = new ConcurrentBag<InstallationInfo>();
|
||||
public ConcurrentBag<InstallationInfo> CompletedInstallations { get; set; }
|
||||
|
||||
#region PluginUninstalled Event
|
||||
/// <summary>
|
||||
@@ -161,6 +162,8 @@ namespace MediaBrowser.Controller.Updates
|
||||
throw new ArgumentNullException("httpClient");
|
||||
}
|
||||
|
||||
CurrentInstallations = new List<Tuple<InstallationInfo, CancellationTokenSource>>();
|
||||
CompletedInstallations = new ConcurrentBag<InstallationInfo>();
|
||||
JsonSerializer = jsonSerializer;
|
||||
HttpClient = httpClient;
|
||||
ApplicationHost = appHost;
|
||||
|
||||
Reference in New Issue
Block a user