From 2f4a00d322e355babfc73aa5d9e546491a02fad8 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Sun, 10 Feb 2019 17:29:55 -0500 Subject: Add support for ZIP plugin archives Most code from @cvium. Also removes the lazy and ill-conceived GUID- based checksumming, which just died with ZIP archives. --- Emby.Server.Implementations/ApplicationHost.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Emby.Server.Implementations/ApplicationHost.cs') diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index bb475eb2c7..3538244064 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -564,7 +564,7 @@ namespace Emby.Server.Implementations { try { - var assembly = Assembly.Load(File.ReadAllBytes(file)); + var assembly = Assembly.LoadFrom(file); return new Tuple(assembly, file); } @@ -777,12 +777,12 @@ namespace Emby.Server.Implementations SocketFactory = new SocketFactory(); RegisterSingleInstance(SocketFactory); - InstallationManager = new InstallationManager(LoggerFactory, this, ApplicationPaths, HttpClient, JsonSerializer, ServerConfigurationManager, FileSystemManager, CryptographyProvider, PackageRuntime); - RegisterSingleInstance(InstallationManager); - ZipClient = new ZipClient(FileSystemManager); RegisterSingleInstance(ZipClient); + InstallationManager = new InstallationManager(LoggerFactory, this, ApplicationPaths, HttpClient, JsonSerializer, ServerConfigurationManager, FileSystemManager, CryptographyProvider, ZipClient, PackageRuntime); + RegisterSingleInstance(InstallationManager); + HttpResultFactory = new HttpResultFactory(LoggerFactory, FileSystemManager, JsonSerializer, CreateBrotliCompressor()); RegisterSingleInstance(HttpResultFactory); @@ -1603,7 +1603,7 @@ namespace Emby.Server.Implementations { try { - return FilterAssembliesToLoad(Directory.EnumerateFiles(path, "*.dll", SearchOption.TopDirectoryOnly)) + return FilterAssembliesToLoad(Directory.EnumerateFiles(path, "*.dll", SearchOption.AllDirectories)) .Select(LoadAssembly) .Where(a => a != null) .ToList(); -- cgit v1.2.3