The Free Software Media System - Server Backend & API
Search all subdirectories for Plugins
Joshua Boniface38fcd31917af
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.csindex 41ca2a1025..dbdf246a2d 100644--- a/Emby.Server.Implementations/ApplicationHost.cs+++ b/Emby.Server.Implementations/ApplicationHost.cs@@ -1047,7 +1047,7 @@ namespace Emby.Server.Implementationsprivate async void PluginInstalled(object sender, GenericEventArgs<PackageVersionInfo> args){string dir = Path.Combine(ApplicationPaths.PluginsPath, Path.GetFileNameWithoutExtension(args.Argument.targetFilename));- var types = Directory.EnumerateFiles(dir, "*.dll", SearchOption.TopDirectoryOnly)+ var types = Directory.EnumerateFiles(dir, "*.dll", SearchOption.AllDirectories).Select(x => Assembly.LoadFrom(x)).SelectMany(x => x.ExportedTypes).Where(x => x.IsClass && !x.IsAbstract && !x.IsInterface && !x.IsGenericType)@@ -1346,7 +1346,7 @@ namespace Emby.Server.Implementations{if (Directory.Exists(ApplicationPaths.PluginsPath)){- foreach (var file in Directory.EnumerateFiles(ApplicationPaths.PluginsPath, "*.dll", SearchOption.TopDirectoryOnly))+ foreach (var file in Directory.EnumerateFiles(ApplicationPaths.PluginsPath, "*.dll", SearchOption.AllDirectories)){Logger.LogInformation("Loading assembly {Path}", file);yield return Assembly.LoadFrom(file);