mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 02:18:54 -07:00
Added a ConfigurationPageInfo stub class so that we're not serializing the Plugin
This commit is contained in:
parent
2c3bd71202
commit
c1d38106c7
33
MediaBrowser.WebDashboard/Api/ConfigurationPageInfo.cs
Normal file
33
MediaBrowser.WebDashboard/Api/ConfigurationPageInfo.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using MediaBrowser.Controller.Plugins;
|
||||
|
||||
namespace MediaBrowser.WebDashboard.Api
|
||||
{
|
||||
public class ConfigurationPageInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the type of the configuration page.
|
||||
/// </summary>
|
||||
/// <value>The type of the configuration page.</value>
|
||||
public ConfigurationPageType ConfigurationPageType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the plugin id.
|
||||
/// </summary>
|
||||
/// <value>The plugin id.</value>
|
||||
public Guid PluginId { get; set; }
|
||||
|
||||
public ConfigurationPageInfo(IPluginConfigurationPage page)
|
||||
{
|
||||
Name = page.Name;
|
||||
ConfigurationPageType = page.ConfigurationPageType;
|
||||
PluginId = page.Plugin.Id;
|
||||
}
|
||||
}
|
||||
}
|
@ -25,7 +25,7 @@ namespace MediaBrowser.WebDashboard.Api
|
||||
/// Class GetDashboardConfigurationPages
|
||||
/// </summary>
|
||||
[Route("/dashboard/ConfigurationPages", "GET")]
|
||||
public class GetDashboardConfigurationPages : IReturn<List<IPluginConfigurationPage>>
|
||||
public class GetDashboardConfigurationPages : IReturn<List<ConfigurationPageInfo>>
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the page.
|
||||
@ -38,7 +38,7 @@ namespace MediaBrowser.WebDashboard.Api
|
||||
/// Class GetDashboardConfigurationPage
|
||||
/// </summary>
|
||||
[Route("/dashboard/ConfigurationPage", "GET")]
|
||||
public class GetDashboardConfigurationPage : IReturn<IPluginConfigurationPage>
|
||||
public class GetDashboardConfigurationPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
@ -174,7 +174,7 @@ namespace MediaBrowser.WebDashboard.Api
|
||||
pages = pages.Where(p => p.ConfigurationPageType == request.PageType.Value);
|
||||
}
|
||||
|
||||
return ToOptimizedResult(pages.ToList());
|
||||
return ToOptimizedResult(pages.Select(p => new ConfigurationPageInfo(p)).ToList());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -36,7 +36,7 @@
|
||||
var plugin = plugins[i];
|
||||
|
||||
var configPage = $.grep(pluginConfigurationPages, function (pluginConfigurationPage) {
|
||||
return pluginConfigurationPage.Plugin.Id == plugin.Id;
|
||||
return pluginConfigurationPage.PluginId == plugin.Id;
|
||||
})[0];
|
||||
|
||||
html += "<li>";
|
||||
|
@ -81,6 +81,7 @@
|
||||
<Compile Include="..\SharedVersion.cs">
|
||||
<Link>Properties\SharedVersion.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Api\ConfigurationPageInfo.cs" />
|
||||
<Compile Include="Api\DashboardInfo.cs" />
|
||||
<Compile Include="Api\DashboardService.cs" />
|
||||
<Compile Include="Api\DashboardInfoWebSocketListener.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user