Add logging, cleanup
This commit is contained in:
parent
9e95fe8f9d
commit
d296a1f6d0
|
@ -1386,27 +1386,16 @@ namespace Emby.Server.Implementations
|
|||
}
|
||||
|
||||
public IEnumerable<Assembly> GetApiPluginAssemblies()
|
||||
{
|
||||
var assemblies = new List<Assembly>();
|
||||
try
|
||||
{
|
||||
var types = _allConcreteTypes
|
||||
.Where(i => typeof(ControllerBase).IsAssignableFrom(i))
|
||||
// .Select(i => ActivatorUtilities.CreateInstance(ServiceProvider, i))
|
||||
.ToArray();
|
||||
.Where(i => typeof(ControllerBase).IsAssignableFrom(i));
|
||||
|
||||
foreach (var variable in types)
|
||||
foreach (var type in types)
|
||||
{
|
||||
assemblies.Add(variable.Assembly);
|
||||
Logger.LogDebug("Found API endpoints in plugin " + type.Assembly.FullName);
|
||||
yield return type.Assembly;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// ignore
|
||||
}
|
||||
|
||||
return assemblies;
|
||||
}
|
||||
|
||||
public virtual void LaunchUrl(string url)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user