aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/ApplicationHost.cs
diff options
context:
space:
mode:
authorDavid Ullmer <daullmer@gmail.com>2020-08-31 17:53:55 +0200
committerDavid Ullmer <daullmer@gmail.com>2020-08-31 17:53:55 +0200
commit7f79f2ee0e1fe3b5f0edb22677df9f9235d883fa (patch)
treecff633ebdd83b9703d722f706fde74703660bee4 /Emby.Server.Implementations/ApplicationHost.cs
parent025ee2163ffea826083fdea6a084090733ab8fff (diff)
Use .Distinct on assembly
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs10
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)