Update BasePlugin.cs

Plugins supporting di cannot be unloaded.
This commit is contained in:
BaronGreenback 2020-10-11 19:56:05 +01:00 committed by GitHub
parent 85d36a55a1
commit 7e939fa2cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,7 +56,8 @@ namespace MediaBrowser.Common.Plugins
/// Gets a value indicating whether the plugin can be uninstalled.
/// </summary>
public bool CanUninstall => !Path.GetDirectoryName(AssemblyFilePath)
.Equals(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), StringComparison.InvariantCulture);
.Equals(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), StringComparison.InvariantCulture) &&
!typeof(IPluginRegistrar).IsAssignableFrom(typeof(this));
/// <summary>
/// Gets the plugin info.