diff options
| author | Bond_009 <bond.009@outlook.com> | 2021-03-05 11:15:14 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2021-03-05 11:15:14 +0100 |
| commit | a6d0db5d0409f72e2abb02291268b6971eaf1fcf (patch) | |
| tree | 34cb989efc171f8085c5455bae33b07b7a356617 | |
| parent | ed7154db68f089cb8366aedaaeb93f1d5405251a (diff) | |
100% branch coverage for DashboardController
| -rw-r--r-- | Emby.Server.Implementations/Plugins/PluginManager.cs | 4 | ||||
| -rw-r--r-- | Jellyfin.Api/Controllers/DashboardController.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Common/Plugins/IPluginManager.cs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/Plugins/PluginManager.cs b/Emby.Server.Implementations/Plugins/PluginManager.cs index 7bc9f0a7e..c579fc8cb 100644 --- a/Emby.Server.Implementations/Plugins/PluginManager.cs +++ b/Emby.Server.Implementations/Plugins/PluginManager.cs @@ -34,7 +34,7 @@ namespace Emby.Server.Implementations.Plugins private readonly ILogger<PluginManager> _logger; private readonly IApplicationHost _appHost; private readonly ServerConfiguration _config; - private readonly IList<LocalPlugin> _plugins; + private readonly List<LocalPlugin> _plugins; private readonly Version _minimumVersion; private IHttpClientFactory? _httpClientFactory; @@ -94,7 +94,7 @@ namespace Emby.Server.Implementations.Plugins /// <summary> /// Gets the Plugins. /// </summary> - public IList<LocalPlugin> Plugins => _plugins; + public IReadOnlyList<LocalPlugin> Plugins => _plugins; /// <summary> /// Returns all the assemblies. diff --git a/Jellyfin.Api/Controllers/DashboardController.cs b/Jellyfin.Api/Controllers/DashboardController.cs index a2c2ecd66..445733c24 100644 --- a/Jellyfin.Api/Controllers/DashboardController.cs +++ b/Jellyfin.Api/Controllers/DashboardController.cs @@ -95,9 +95,9 @@ namespace Jellyfin.Api.Controllers return GetPluginPages(plugin).Select(i => new ConfigurationPageInfo(plugin.Instance, i.Item1)); } - private IEnumerable<Tuple<PluginPageInfo, IPlugin>> GetPluginPages(LocalPlugin? plugin) + private IEnumerable<Tuple<PluginPageInfo, IPlugin>> GetPluginPages(LocalPlugin plugin) { - if (plugin?.Instance is not IHasWebPages hasWebPages) + if (plugin.Instance is not IHasWebPages hasWebPages) { return Enumerable.Empty<Tuple<PluginPageInfo, IPlugin>>(); } diff --git a/MediaBrowser.Common/Plugins/IPluginManager.cs b/MediaBrowser.Common/Plugins/IPluginManager.cs index fc2fcb517..f9a8fb6f7 100644 --- a/MediaBrowser.Common/Plugins/IPluginManager.cs +++ b/MediaBrowser.Common/Plugins/IPluginManager.cs @@ -17,7 +17,7 @@ namespace MediaBrowser.Common.Plugins /// <summary> /// Gets the Plugins. /// </summary> - IList<LocalPlugin> Plugins { get; } + IReadOnlyList<LocalPlugin> Plugins { get; } /// <summary> /// Creates the plugins. |
