diff options
| author | dkanada <dkanada@users.noreply.github.com> | 2020-04-06 19:01:15 +0900 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2020-04-12 15:50:09 -0400 |
| commit | f2728b5a927434a659be66d9ef29a204741ab8b2 (patch) | |
| tree | 0112c7173b3b326e34c1a81258b9f73afaa19d61 | |
| parent | ee47a75f9ffd72b1de889fbd26661fef02c0782f (diff) | |
Merge pull request #2758 from Bond-009/plugininstalled
Remove PluginInstalled
(cherry picked from commit 0cd7cd611e6118b8dac31cf3c6861509f2b33c56)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index be4e343b4..8e8daa773 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1016,48 +1016,12 @@ namespace Emby.Server.Implementations AuthenticatedAttribute.AuthService = AuthService; } - private async void PluginInstalled(object sender, GenericEventArgs<PackageVersionInfo> args) - { - string dir = Path.Combine(ApplicationPaths.PluginsPath, args.Argument.name); - var types = Directory.EnumerateFiles(dir, "*.dll", SearchOption.AllDirectories) - .Select(Assembly.LoadFrom) - .SelectMany(x => x.ExportedTypes) - .Where(x => x.IsClass && !x.IsAbstract && !x.IsInterface && !x.IsGenericType) - .ToArray(); - - int oldLen = _allConcreteTypes.Length; - Array.Resize(ref _allConcreteTypes, oldLen + types.Length); - types.CopyTo(_allConcreteTypes, oldLen); - - var plugins = types.Where(x => x.IsAssignableFrom(typeof(IPlugin))) - .Select(CreateInstanceSafe) - .Where(x => x != null) - .Cast<IPlugin>() - .Select(LoadPlugin) - .Where(x => x != null) - .ToArray(); - - oldLen = _plugins.Length; - Array.Resize(ref _plugins, oldLen + plugins.Length); - plugins.CopyTo(_plugins, oldLen); - - var entries = types.Where(x => x.IsAssignableFrom(typeof(IServerEntryPoint))) - .Select(CreateInstanceSafe) - .Where(x => x != null) - .Cast<IServerEntryPoint>() - .ToList(); - - await Task.WhenAll(StartEntryPoints(entries, true)).ConfigureAwait(false); - await Task.WhenAll(StartEntryPoints(entries, false)).ConfigureAwait(false); - } - /// <summary> /// Finds the parts. /// </summary> public void FindParts() { InstallationManager = ServiceProvider.GetService<IInstallationManager>(); - InstallationManager.PluginInstalled += PluginInstalled; if (!ServerConfigurationManager.Configuration.IsPortAuthorized) { |
