aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/ApplicationHost.cs
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2019-04-08 11:24:53 -0400
committerGitHub <noreply@github.com>2019-04-08 11:24:53 -0400
commit21950382b9f0939c870fb533eefa33d8af94925d (patch)
tree1c442ad7591e47b6cce71912299ab152f36c0992 /Emby.Server.Implementations/ApplicationHost.cs
parent2d19bfa7fbd4b76df0f34f4e603fd3f8283e743c (diff)
parent754e76a61bbf4bbda5a4a1073737c07bf28f5f3a (diff)
Merge pull request #1188 from joshuaboniface/hotfix-pluginload
Fix problems with plugin installation
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index 41ca2a102..05f8a8a5e 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -1046,8 +1046,8 @@ namespace Emby.Server.Implementations
private 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)
+ string dir = Path.Combine(ApplicationPaths.PluginsPath, args.Argument.name);
+ 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);