mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-11 08:10:34 +02:00
exclude defunct assemblies
This commit is contained in:
parent
8030370cfa
commit
f6acc5fbff
|
@ -1273,6 +1273,7 @@ namespace MediaBrowser.Server.Startup.Common
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return Directory.EnumerateFiles(ApplicationPaths.PluginsPath, "*.dll", SearchOption.TopDirectoryOnly)
|
return Directory.EnumerateFiles(ApplicationPaths.PluginsPath, "*.dll", SearchOption.TopDirectoryOnly)
|
||||||
|
.Where(EnablePlugin)
|
||||||
.Select(LoadAssembly)
|
.Select(LoadAssembly)
|
||||||
.Where(a => a != null)
|
.Where(a => a != null)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
@ -1283,6 +1284,19 @@ namespace MediaBrowser.Server.Startup.Common
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool EnablePlugin(string path)
|
||||||
|
{
|
||||||
|
var filename = Path.GetFileName(path);
|
||||||
|
|
||||||
|
var exclude = new[]
|
||||||
|
{
|
||||||
|
"mbplus.dll",
|
||||||
|
"mbintros.dll"
|
||||||
|
};
|
||||||
|
|
||||||
|
return !exclude.Contains(filename ?? string.Empty, StringComparer.OrdinalIgnoreCase);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the system status.
|
/// Gets the system status.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in a new issue