diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-09-20 13:22:39 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-20 13:22:39 -0400 |
| commit | eb2a1330045d802bfe0366df7105c220a36f111f (patch) | |
| tree | 2c1638c424ee9c0837c5de6d6e08a2398da69cdb /MediaBrowser.WebDashboard/Api/ConfigurationPageInfo.cs | |
| parent | ec426d5c92875639ceac64477ce10fab3e639335 (diff) | |
| parent | a015e1208885bc6a8788db683c4fe47e93dc26b7 (diff) | |
Merge pull request #2897 from MediaBrowser/beta
Beta
Diffstat (limited to 'MediaBrowser.WebDashboard/Api/ConfigurationPageInfo.cs')
| -rw-r--r-- | MediaBrowser.WebDashboard/Api/ConfigurationPageInfo.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/MediaBrowser.WebDashboard/Api/ConfigurationPageInfo.cs b/MediaBrowser.WebDashboard/Api/ConfigurationPageInfo.cs index 33289e76c..b69c14fee 100644 --- a/MediaBrowser.WebDashboard/Api/ConfigurationPageInfo.cs +++ b/MediaBrowser.WebDashboard/Api/ConfigurationPageInfo.cs @@ -11,6 +11,9 @@ namespace MediaBrowser.WebDashboard.Api /// </summary> /// <value>The name.</value> public string Name { get; set; } + public bool EnableInMainMenu { get; set; } + + public string DisplayName { get; set; } /// <summary> /// Gets the type of the configuration page. @@ -27,15 +30,22 @@ namespace MediaBrowser.WebDashboard.Api public ConfigurationPageInfo(IPluginConfigurationPage page) { Name = page.Name; + ConfigurationPageType = page.ConfigurationPageType; - // Don't use "N" because it needs to match Plugin.Id - PluginId = page.Plugin.Id.ToString(); + if (page.Plugin != null) + { + DisplayName = page.Plugin.Name; + // Don't use "N" because it needs to match Plugin.Id + PluginId = page.Plugin.Id.ToString(); + } } public ConfigurationPageInfo(IPlugin plugin, PluginPageInfo page) { Name = page.Name; + EnableInMainMenu = page.EnableInMainMenu; + DisplayName = string.IsNullOrWhiteSpace(page.DisplayName) ? plugin.Name : page.DisplayName; // Don't use "N" because it needs to match Plugin.Id PluginId = plugin.Id.ToString(); |
