소스 검색

Change log message, load assembly only once

David 4 년 전
부모
커밋
025ee2163f
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      Emby.Server.Implementations/ApplicationHost.cs

+ 3 - 2
Emby.Server.Implementations/ApplicationHost.cs

@@ -1388,11 +1388,12 @@ namespace Emby.Server.Implementations
         public IEnumerable<Assembly> GetApiPluginAssemblies()
         {
             var types = _allConcreteTypes
-                .Where(i => typeof(ControllerBase).IsAssignableFrom(i));
+                .Where(i => typeof(ControllerBase).IsAssignableFrom(i))
+                .Distinct();
 
             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;
             }
         }