Change log message, load assembly only once

This commit is contained in:
David 2020-08-14 20:42:26 +02:00
parent d296a1f6d0
commit 025ee2163f

View File

@ -1388,11 +1388,12 @@ namespace Emby.Server.Implementations
public IEnumerable<Assembly> GetApiPluginAssemblies() public IEnumerable<Assembly> GetApiPluginAssemblies()
{ {
var types = _allConcreteTypes var types = _allConcreteTypes
.Where(i => typeof(ControllerBase).IsAssignableFrom(i)); .Where(i => typeof(ControllerBase).IsAssignableFrom(i))
.Distinct();
foreach (var type in types) foreach (var type in types)
{ {
Logger.LogDebug("Found API endpoints in plugin " + type.Assembly.FullName); Logger.LogDebug("Found API endpoints in plugin {name}", type.Assembly.FullName);
yield return type.Assembly; yield return type.Assembly;
} }
} }