diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2020-12-31 18:47:05 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-31 18:47:05 -0500 |
| commit | 406ae3e43a20216292c554151fa2d0e2a09edfa3 (patch) | |
| tree | 288ceeb9831470d5f573fccc6619f23b259c5531 /Jellyfin.Api/Models/ConfigurationPageInfo.cs | |
| parent | e006cc8ac32ac470a203f60dfd49cbe3acc999e7 (diff) | |
| parent | bd1c115e46795f7db38366d31de79bf2ff88ca8d (diff) | |
Merge pull request #4709 from BaronGreenback/PluginDowngrade
Diffstat (limited to 'Jellyfin.Api/Models/ConfigurationPageInfo.cs')
| -rw-r--r-- | Jellyfin.Api/Models/ConfigurationPageInfo.cs | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/Jellyfin.Api/Models/ConfigurationPageInfo.cs b/Jellyfin.Api/Models/ConfigurationPageInfo.cs index 2aa6373aa..f56ef5976 100644 --- a/Jellyfin.Api/Models/ConfigurationPageInfo.cs +++ b/Jellyfin.Api/Models/ConfigurationPageInfo.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Common.Plugins; +using System; +using MediaBrowser.Common.Plugins; using MediaBrowser.Controller.Plugins; using MediaBrowser.Model.Plugins; @@ -22,8 +23,7 @@ namespace Jellyfin.Api.Models if (page.Plugin != null) { DisplayName = page.Plugin.Name; - // Don't use "N" because it needs to match Plugin.Id - PluginId = page.Plugin.Id.ToString(); + PluginId = page.Plugin.Id; } } @@ -32,16 +32,14 @@ namespace Jellyfin.Api.Models /// </summary> /// <param name="plugin">Instance of <see cref="IPlugin"/> interface.</param> /// <param name="page">Instance of <see cref="PluginPageInfo"/> interface.</param> - public ConfigurationPageInfo(IPlugin plugin, PluginPageInfo page) + public ConfigurationPageInfo(IPlugin? plugin, PluginPageInfo page) { Name = page.Name; EnableInMainMenu = page.EnableInMainMenu; MenuSection = page.MenuSection; MenuIcon = page.MenuIcon; - DisplayName = string.IsNullOrWhiteSpace(page.DisplayName) ? plugin.Name : page.DisplayName; - - // Don't use "N" because it needs to match Plugin.Id - PluginId = plugin.Id.ToString(); + DisplayName = string.IsNullOrWhiteSpace(page.DisplayName) ? plugin?.Name : page.DisplayName; + PluginId = plugin?.Id; } /// <summary> @@ -80,6 +78,6 @@ namespace Jellyfin.Api.Models /// Gets or sets the plugin id. /// </summary> /// <value>The plugin id.</value> - public string? PluginId { get; set; } + public Guid? PluginId { get; set; } } } |
