aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Plugins/PluginManager.cs
diff options
context:
space:
mode:
authorOrry Verducci <orry@orryverducci.co.uk>2021-12-01 22:13:52 +0000
committerGitHub <noreply@github.com>2021-12-01 22:13:52 +0000
commite446e9fde935ad5744500e6efaab8fcacf89b600 (patch)
tree9012e91423660bf4bc9992f06cf26f53e826fb65 /Emby.Server.Implementations/Plugins/PluginManager.cs
parent9abe9e7e54cc454667ba2128b5d321631b5ece51 (diff)
parentf6d8c19a7ac41c6c7c217d9e9ccbf98f78122327 (diff)
Merge branch 'master' into mbaff-interlace-detection
Diffstat (limited to 'Emby.Server.Implementations/Plugins/PluginManager.cs')
-rw-r--r--Emby.Server.Implementations/Plugins/PluginManager.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Plugins/PluginManager.cs b/Emby.Server.Implementations/Plugins/PluginManager.cs
index d52c0b2a1..d70a15dbc 100644
--- a/Emby.Server.Implementations/Plugins/PluginManager.cs
+++ b/Emby.Server.Implementations/Plugins/PluginManager.cs
@@ -126,7 +126,8 @@ namespace Emby.Server.Implementations.Plugins
{
assembly = Assembly.LoadFrom(file);
- assembly.GetExportedTypes();
+ // Load all required types to verify that the plugin will load
+ assembly.GetTypes();
}
catch (FileLoadException ex)
{
@@ -134,7 +135,7 @@ namespace Emby.Server.Implementations.Plugins
ChangePluginState(plugin, PluginStatus.Malfunctioned);
continue;
}
- catch (TypeLoadException ex) // Undocumented exception
+ catch (SystemException ex) when (ex is TypeLoadException or ReflectionTypeLoadException) // Undocumented exception
{
_logger.LogError(ex, "Failed to load assembly {Path}. This error occurs when a plugin references an incompatible version of one of the shared libraries. Disabling plugin.", file);
ChangePluginState(plugin, PluginStatus.NotSupported);