| | 1 | | using System; |
| | 2 | | using MediaBrowser.Common.Plugins; |
| | 3 | | using MediaBrowser.Model.Plugins; |
| | 4 | |
|
| | 5 | | namespace Jellyfin.Api.Models; |
| | 6 | |
|
| | 7 | | /// <summary> |
| | 8 | | /// The configuration page info. |
| | 9 | | /// </summary> |
| | 10 | | public class ConfigurationPageInfo |
| | 11 | | { |
| | 12 | | /// <summary> |
| | 13 | | /// Initializes a new instance of the <see cref="ConfigurationPageInfo"/> class. |
| | 14 | | /// </summary> |
| | 15 | | /// <param name="plugin">Instance of <see cref="IPlugin"/> interface.</param> |
| | 16 | | /// <param name="page">Instance of <see cref="PluginPageInfo"/> interface.</param> |
| | 17 | | public ConfigurationPageInfo(IPlugin? plugin, PluginPageInfo page) |
| | 18 | | { |
| 14 | 19 | | Name = page.Name; |
| 14 | 20 | | EnableInMainMenu = page.EnableInMainMenu; |
| 14 | 21 | | MenuSection = page.MenuSection; |
| 14 | 22 | | MenuIcon = page.MenuIcon; |
| 14 | 23 | | DisplayName = string.IsNullOrWhiteSpace(page.DisplayName) ? plugin?.Name : page.DisplayName; |
| 14 | 24 | | PluginId = plugin?.Id; |
| 14 | 25 | | } |
| | 26 | |
|
| | 27 | | /// <summary> |
| | 28 | | /// Initializes a new instance of the <see cref="ConfigurationPageInfo"/> class. |
| | 29 | | /// </summary> |
| | 30 | | public ConfigurationPageInfo() |
| | 31 | | { |
| 7 | 32 | | Name = string.Empty; |
| 7 | 33 | | } |
| | 34 | |
|
| | 35 | | /// <summary> |
| | 36 | | /// Gets or sets the name. |
| | 37 | | /// </summary> |
| | 38 | | /// <value>The name.</value> |
| | 39 | | public string Name { get; set; } |
| | 40 | |
|
| | 41 | | /// <summary> |
| | 42 | | /// Gets or sets a value indicating whether the configurations page is enabled in the main menu. |
| | 43 | | /// </summary> |
| | 44 | | public bool EnableInMainMenu { get; set; } |
| | 45 | |
|
| | 46 | | /// <summary> |
| | 47 | | /// Gets or sets the menu section. |
| | 48 | | /// </summary> |
| | 49 | | public string? MenuSection { get; set; } |
| | 50 | |
|
| | 51 | | /// <summary> |
| | 52 | | /// Gets or sets the menu icon. |
| | 53 | | /// </summary> |
| | 54 | | public string? MenuIcon { get; set; } |
| | 55 | |
|
| | 56 | | /// <summary> |
| | 57 | | /// Gets or sets the display name. |
| | 58 | | /// </summary> |
| | 59 | | public string? DisplayName { get; set; } |
| | 60 | |
|
| | 61 | | /// <summary> |
| | 62 | | /// Gets or sets the plugin id. |
| | 63 | | /// </summary> |
| | 64 | | /// <value>The plugin id.</value> |
| | 65 | | public Guid? PluginId { get; set; } |
| | 66 | | } |