mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-03 15:26:34 +01:00
isolated clickonce dependancies
This commit is contained in:
@@ -13,7 +13,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.ComponentModel.Composition.Hosting;
|
||||
using System.Deployment.Application;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -155,12 +154,6 @@ namespace MediaBrowser.Common.Kernel
|
||||
/// <value><c>true</c> if this instance is first run; otherwise, <c>false</c>.</value>
|
||||
public bool IsFirstRun { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The version of the application to display
|
||||
/// </summary>
|
||||
/// <value>The display version.</value>
|
||||
public string DisplayVersion { get { return ApplicationVersion.ToString(); } }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance has changes that require the entire application to restart.
|
||||
/// </summary>
|
||||
@@ -325,7 +318,10 @@ namespace MediaBrowser.Common.Kernel
|
||||
/// Gets the log file path.
|
||||
/// </summary>
|
||||
/// <value>The log file path.</value>
|
||||
public string LogFilePath { get; private set; }
|
||||
public string LogFilePath
|
||||
{
|
||||
get { return ApplicationHost.LogFilePath; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the logger.
|
||||
@@ -429,7 +425,7 @@ namespace MediaBrowser.Common.Kernel
|
||||
await ReloadComposableParts().ConfigureAwait(false);
|
||||
|
||||
DisposeTcpManager();
|
||||
TcpManager = new TcpManager(this, Logger);
|
||||
TcpManager = new TcpManager(ApplicationHost, this, Logger);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -482,6 +478,7 @@ namespace MediaBrowser.Common.Kernel
|
||||
protected virtual void ComposeExportedValues(CompositionContainer container)
|
||||
{
|
||||
container.ComposeExportedValue("logger", Logger);
|
||||
container.ComposeExportedValue("appHost", ApplicationHost);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -729,8 +726,8 @@ namespace MediaBrowser.Common.Kernel
|
||||
return new SystemInfo
|
||||
{
|
||||
HasPendingRestart = HasPendingRestart,
|
||||
Version = DisplayVersion,
|
||||
IsNetworkDeployed = ApplicationDeployment.IsNetworkDeployed,
|
||||
Version = ApplicationVersion.ToString(),
|
||||
IsNetworkDeployed = ApplicationHost.CanSelfUpdate,
|
||||
WebSocketPortNumber = TcpManager.WebSocketPortNumber,
|
||||
SupportsNativeWebSocket = TcpManager.SupportsNativeWebSocket,
|
||||
FailedPluginAssemblies = FailedPluginAssemblies.ToArray()
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
|
||||
using MediaBrowser.Model.Updates;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Common.Kernel
|
||||
{
|
||||
/// <summary>
|
||||
@@ -15,5 +19,29 @@ namespace MediaBrowser.Common.Kernel
|
||||
/// Reloads the logger.
|
||||
/// </summary>
|
||||
void ReloadLogger();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the log file path.
|
||||
/// </summary>
|
||||
/// <value>The log file path.</value>
|
||||
string LogFilePath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance can self update.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance can self update; otherwise, <c>false</c>.</value>
|
||||
bool CanSelfUpdate { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Checks for update.
|
||||
/// </summary>
|
||||
/// <returns>Task{CheckForUpdateResult}.</returns>
|
||||
Task<CheckForUpdateResult> CheckForApplicationUpdate(CancellationToken cancellationToken, IProgress<double> progress);
|
||||
|
||||
/// <summary>
|
||||
/// Updates the application.
|
||||
/// </summary>
|
||||
/// <returns>Task.</returns>
|
||||
Task UpdateApplication(CancellationToken cancellationToken, IProgress<double> progress);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,6 +64,11 @@ namespace MediaBrowser.Common.Kernel
|
||||
/// The _logger
|
||||
/// </summary>
|
||||
private readonly ILogger _logger;
|
||||
|
||||
/// <summary>
|
||||
/// The _application host
|
||||
/// </summary>
|
||||
private readonly IApplicationHost _applicationHost;
|
||||
|
||||
/// <summary>
|
||||
/// The _supports native web socket
|
||||
@@ -108,12 +113,14 @@ namespace MediaBrowser.Common.Kernel
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TcpManager" /> class.
|
||||
/// </summary>
|
||||
/// <param name="applicationHost">The application host.</param>
|
||||
/// <param name="kernel">The kernel.</param>
|
||||
/// <param name="logger">The logger.</param>
|
||||
public TcpManager(IKernel kernel, ILogger logger)
|
||||
public TcpManager(IApplicationHost applicationHost, IKernel kernel, ILogger logger)
|
||||
: base(kernel)
|
||||
{
|
||||
_logger = logger;
|
||||
_applicationHost = applicationHost;
|
||||
|
||||
if (kernel.IsFirstRun)
|
||||
{
|
||||
@@ -182,7 +189,7 @@ namespace MediaBrowser.Common.Kernel
|
||||
|
||||
try
|
||||
{
|
||||
HttpServer = new HttpServer(Kernel.HttpServerUrlPrefix, "Media Browser", Kernel, _logger);
|
||||
HttpServer = new HttpServer(Kernel.HttpServerUrlPrefix, "Media Browser", _applicationHost, Kernel, _logger);
|
||||
}
|
||||
catch (HttpListenerException ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user