diff options
| author | David Ullmer <daullmer@gmail.com> | 2020-08-31 17:53:55 +0200 |
|---|---|---|
| committer | David Ullmer <daullmer@gmail.com> | 2020-08-31 17:53:55 +0200 |
| commit | 7f79f2ee0e1fe3b5f0edb22677df9f9235d883fa (patch) | |
| tree | cff633ebdd83b9703d722f706fde74703660bee4 /Emby.Server.Implementations/ApplicationHost.cs | |
| parent | 025ee2163ffea826083fdea6a084090733ab8fff (diff) | |
Use .Distinct on assembly
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 62c2e55c2..d2f016f7d 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1387,15 +1387,17 @@ namespace Emby.Server.Implementations public IEnumerable<Assembly> GetApiPluginAssemblies() { - var types = _allConcreteTypes + var assemblies = _allConcreteTypes .Where(i => typeof(ControllerBase).IsAssignableFrom(i)) + .Select(i => i.Assembly) .Distinct(); - foreach (var type in types) + foreach (var assembly in assemblies) { - Logger.LogDebug("Found API endpoints in plugin {name}", type.Assembly.FullName); - yield return type.Assembly; + Logger.LogDebug("Found API endpoints in plugin {name}", assembly.FullName); } + + return assemblies; } public virtual void LaunchUrl(string url) |
