mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-04 22:24:35 -04:00
100% branch coverage for DashboardController
This commit is contained in:
parent
ed7154db68
commit
a6d0db5d04
@ -34,7 +34,7 @@ namespace Emby.Server.Implementations.Plugins
|
|||||||
private readonly ILogger<PluginManager> _logger;
|
private readonly ILogger<PluginManager> _logger;
|
||||||
private readonly IApplicationHost _appHost;
|
private readonly IApplicationHost _appHost;
|
||||||
private readonly ServerConfiguration _config;
|
private readonly ServerConfiguration _config;
|
||||||
private readonly IList<LocalPlugin> _plugins;
|
private readonly List<LocalPlugin> _plugins;
|
||||||
private readonly Version _minimumVersion;
|
private readonly Version _minimumVersion;
|
||||||
|
|
||||||
private IHttpClientFactory? _httpClientFactory;
|
private IHttpClientFactory? _httpClientFactory;
|
||||||
@ -94,7 +94,7 @@ namespace Emby.Server.Implementations.Plugins
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the Plugins.
|
/// Gets the Plugins.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IList<LocalPlugin> Plugins => _plugins;
|
public IReadOnlyList<LocalPlugin> Plugins => _plugins;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns all the assemblies.
|
/// Returns all the assemblies.
|
||||||
|
@ -95,9 +95,9 @@ namespace Jellyfin.Api.Controllers
|
|||||||
return GetPluginPages(plugin).Select(i => new ConfigurationPageInfo(plugin.Instance, i.Item1));
|
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>>();
|
return Enumerable.Empty<Tuple<PluginPageInfo, IPlugin>>();
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ namespace MediaBrowser.Common.Plugins
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the Plugins.
|
/// Gets the Plugins.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IList<LocalPlugin> Plugins { get; }
|
IReadOnlyList<LocalPlugin> Plugins { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates the plugins.
|
/// Creates the plugins.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user