The Free Software Media System - Server Backend & API
Added referenced assembly failure detection, and DI failure protection.
BaronGreenback149c2b216919
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.csindex 094134318c..1b9bb86bbd 100644--- a/Emby.Server.Implementations/ApplicationHost.cs+++ b/Emby.Server.Implementations/ApplicationHost.cs@@ -413,6 +413,8 @@ namespace Emby.Server.Implementationscatch (Exception ex){Logger.LogError(ex, "Error creating {Type}", type);+ // If this is a plugin fail it.+ _pluginManager.FailPlugin(type.Assembly);return null;}finallydiff --git a/Emby.Server.Implementations/Plugins/PluginManager.cs b/Emby.Server.Implementations/Plugins/PluginManager.csindex 51a75f6a39..1ab01252d0 100644--- a/Emby.Server.Implementations/Plugins/PluginManager.cs+++ b/Emby.Server.Implementations/Plugins/PluginManager.cs@@ -111,6 +111,10 @@ namespace Emby.Server.Implementations.Pluginstry{assembly = Assembly.LoadFrom(file);++ // This force loads all reference dll's that the plugin uses in the try..catch block.+ // Removing this will cause JF to bomb out if referenced dll's cause issues.+ assembly.GetExportedTypes();}catch (FileLoadException ex){