Add logging, cleanup

This commit is contained in:
David 2020-08-12 14:00:48 +02:00
parent 9e95fe8f9d
commit d296a1f6d0

View File

@ -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)
{