diff options
| author | David <daullmer@gmail.com> | 2020-08-12 14:00:48 +0200 |
|---|---|---|
| committer | David <daullmer@gmail.com> | 2020-08-12 14:00:48 +0200 |
| commit | d296a1f6d0ee8cb48c2234aa9666d01035cd18b5 (patch) | |
| tree | ca714411676ceb59a8ff10eac42d8ab80cd81b01 | |
| parent | 9e95fe8f9d402ec178024be962115abd6033fb51 (diff) | |
Add logging, cleanup
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 438f4384f..4fb5d40c5 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1387,25 +1387,14 @@ namespace Emby.Server.Implementations public IEnumerable<Assembly> GetApiPluginAssemblies() { - var assemblies = new List<Assembly>(); - try - { - var types = _allConcreteTypes - .Where(i => typeof(ControllerBase).IsAssignableFrom(i)) - // .Select(i => ActivatorUtilities.CreateInstance(ServiceProvider, i)) - .ToArray(); + var types = _allConcreteTypes + .Where(i => typeof(ControllerBase).IsAssignableFrom(i)); - foreach (var variable in types) - { - assemblies.Add(variable.Assembly); - } - } - catch (Exception ex) + foreach (var type in types) { - // ignore + Logger.LogDebug("Found API endpoints in plugin " + type.Assembly.FullName); + yield return type.Assembly; } - - return assemblies; } public virtual void LaunchUrl(string url) |
