mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 17:14:42 +01:00
Use .Distinct on assembly
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user