make channel access opt-in rather than opt out

This commit is contained in:
Luke Pulverenti
2015-01-12 22:46:44 -05:00
parent f552174069
commit d8d5dd4873
72 changed files with 399 additions and 241 deletions

View File

@@ -1,6 +1,7 @@
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Events;
using MediaBrowser.Common.Implementations.Security;
using MediaBrowser.Common.IO;
using MediaBrowser.Common.Net;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Common.Progress;
@@ -106,6 +107,7 @@ namespace MediaBrowser.Common.Implementations.Updates
private readonly IJsonSerializer _jsonSerializer;
private readonly ISecurityManager _securityManager;
private readonly IConfigurationManager _config;
private readonly IFileSystem _fileSystem;
/// <summary>
/// Gets the application host.
@@ -113,7 +115,7 @@ namespace MediaBrowser.Common.Implementations.Updates
/// <value>The application host.</value>
private readonly IApplicationHost _applicationHost;
public InstallationManager(ILogger logger, IApplicationHost appHost, IApplicationPaths appPaths, IHttpClient httpClient, IJsonSerializer jsonSerializer, ISecurityManager securityManager, IConfigurationManager config)
public InstallationManager(ILogger logger, IApplicationHost appHost, IApplicationPaths appPaths, IHttpClient httpClient, IJsonSerializer jsonSerializer, ISecurityManager securityManager, IConfigurationManager config, IFileSystem fileSystem)
{
if (logger == null)
{
@@ -129,6 +131,7 @@ namespace MediaBrowser.Common.Implementations.Updates
_jsonSerializer = jsonSerializer;
_securityManager = securityManager;
_config = config;
_fileSystem = fileSystem;
_logger = logger;
}
@@ -570,7 +573,7 @@ namespace MediaBrowser.Common.Implementations.Updates
try
{
File.Delete(tempFile);
_fileSystem.DeleteFile(tempFile);
}
catch (IOException e)
{
@@ -591,7 +594,7 @@ namespace MediaBrowser.Common.Implementations.Updates
// Remove it the quick way for now
_applicationHost.RemovePlugin(plugin);
File.Delete(plugin.AssemblyFilePath);
_fileSystem.DeleteFile(plugin.AssemblyFilePath);
OnPluginUninstalled(plugin);