diff options
Diffstat (limited to 'Emby.Server.Implementations')
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 5 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Plugins/PluginManager.cs | 11 |
2 files changed, 10 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 8df1ec300..ddb48ff6e 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -406,10 +406,7 @@ namespace Emby.Server.Implementations Logger.LogError("Called from: {stack}", entry.FullName); } - if (type is IPlugin) - { - _pluginManager.FailPlugin(type.Assembly); - } + _pluginManager.FailPlugin(type.Assembly); throw new ExternalException("DI Loop detected."); } diff --git a/Emby.Server.Implementations/Plugins/PluginManager.cs b/Emby.Server.Implementations/Plugins/PluginManager.cs index 1377c80ea..07b729748 100644 --- a/Emby.Server.Implementations/Plugins/PluginManager.cs +++ b/Emby.Server.Implementations/Plugins/PluginManager.cs @@ -296,7 +296,7 @@ namespace Emby.Server.Implementations return; } - if (!ChangePluginState(predecessor, PluginStatus.Superceded)) + if (predecessor.Manifest.Status == PluginStatus.Active && !ChangePluginState(predecessor, PluginStatus.Superceded)) { _logger.LogError("Unable to disable version {Version} of {Name}", predecessor.Version, predecessor.Name); } @@ -314,7 +314,10 @@ namespace Emby.Server.Implementations throw new ArgumentNullException(nameof(assembly)); } - var plugin = _plugins.Where(p => assembly.Equals(p.Assembly)).FirstOrDefault(); + var plugin = _plugins.Where( + p => assembly.Equals(p.Assembly) + || string.Equals(assembly.Location, assembly.Location, StringComparison.OrdinalIgnoreCase)) + .FirstOrDefault(); if (plugin == null) { // A plugin's assembly didn't cause this issue, so ignore it. @@ -403,6 +406,10 @@ namespace Emby.Server.Implementations { // Find the record for this plugin. var plugin = GetPluginByType(type); + if (plugin?.Manifest.Status < PluginStatus.Active) + { + return null; + } try { |
